Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThrowsAnyAsync<> not validating type #1050

Closed
Timovzl opened this issue Aug 25, 2020 · 1 comment
Closed

ThrowsAnyAsync<> not validating type #1050

Timovzl opened this issue Aug 25, 2020 · 1 comment

Comments

@Timovzl
Copy link

Timovzl commented Aug 25, 2020

Version: 4.14.5

Assert.ThrowsAnyAsync<> is not validating the exception type.

For example, have the code throw an ArgumentException. Assert.ThrowsAnyAsync<> succeeds not only for ArgumentException or Exception, but also for unrelated types, such as KeyNotFoundException or TimeoutException.

@Timovzl
Copy link
Author

Timovzl commented Aug 25, 2020

Or am being silly and missing ReSharper and forgetting awaits...

@Timovzl Timovzl closed this as completed Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant