Conversation
…ue they are not necessary and caused bugs.
…s are propagates correctly from the handlers to NUnit. Async handlers are still executed asynchronously inside the AsyncEvent.
TravellerD14
approved these changes
Apr 15, 2025
TSAVogt
reviewed
Apr 15, 2025
| var exception = new Exception("Test exception"); | ||
| var testMethodEventArgs = new TestHookTestMethodEventArgs(null); | ||
| asyncEvent.AddAsyncHandler(async (sender, args) => throw exception); | ||
| Assert.Throws<AggregateException>(() => invoke(this, testMethodEventArgs).Wait()); |
Owner
There was a problem hiding this comment.
wondering about this wait? Didn't I remove that?
Collaborator
Author
There was a problem hiding this comment.
I think this wait is in principle correct here, however it would not be needed since the exception is thrown
| var exception = new Exception("Test exception"); | ||
| var testMethodEventArgs = new TestHookTestMethodEventArgs(null); | ||
| syncEvent.AddHandler((sender, args) => throw exception); | ||
| Assert.Throws<AggregateException>(() => invoke(this, testMethodEventArgs).Wait()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Simplification of Hook Extensions.
Removed unnecessary async handlers.
Fixed HookExtension copy constructor and added tests.