-
Notifications
You must be signed in to change notification settings - Fork 731
Fix for ThrowExactly and ThrowExactlyAsync not working with AggregateExceptions #1046
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
Conversation
…sertions into ThrowExactly-unwrapping-fix
|
I've updated the documentation and tested that the site still looks good locally. In terms of the comment I made above about how I would like to reduce the amount of duplicated code, this actually doesn't seem entirely feasible at this point and appears to be a widespread issue in the solution, including the areas where I deleted old code. In terms of this PR, do you have any other suggestions for other changes to be made at this stage, or are things at least good enough for this fix to be merged? Thanks very much :) |
Actually, this is exactly what I did in #1048. |
Thanks, I'll check out what you did in that PR and try and refactor things in a similar way. |
|
Or rebase on mine ;-) |
I gave rebasing a go and had a look over all the changes but it turns out they weren't really in line with what I needed to reduce the duplicate code between AsyncFunctionAssertions and ActionAssertions. I took a different approach which you can see here #1054 |
|
Awaiting merge of #1054 |
|
@dennisdoomen that duplicate code has now been removed, due to merging in the latest refactorings from master. Please let me know if there's any other changes needed for this PR. Thanks very much |
This fixes #1045 and resolves #696.
This pull request fixes ThrowExactly and ThrowExactlyAsync, when using AggregateExceptions. The documentation has also been updated to reflect the changes.
These two methods previously would not throw an exception if an AggregateException was thrown containing an instance of the expected exception type. These methods will now throw an exception, unless you're asserting that an AggregateException was thrown.