-
-
Notifications
You must be signed in to change notification settings - Fork 27
Support registering multiple handlers in the same class #41
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
Support registering multiple handlers in the same class #41
Conversation
| var streamPipelineBehaviorType = typeof(IStreamPipelineBehavior<,>); | ||
| var syncNotificationHandlerType = typeof(INotificationHandler<>); | ||
|
|
||
| var otherHandlerTypes = new HashSet<Type>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not related to the fix, but I thought we can avoid constructing the handler types array multiple times.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@hasanxdev Can you please provide more info on where I should be placing the tests? |
|
@wassim-k Please place the main test that includes the Fact for notifications in this file: For the handlers, put them inside this file: If you need to create a new file, please move it into the DispatchR.TestCommon. |
bcaf5ea to
87c2b4b
Compare
|
Tests are updated, and I can confirm 100% coverage of code changed in this PR. |
|
Hi @hasanxdev, codecov seems to also take testing code into account, should that be excluded from the report? |
|
Hi @wassim-k , Since this library is still quite new, it’s already hard for people to trust it. A 100% test coverage isn’t necessarily what makes developers adopt a library, but it’s definitely one of the key factors they consider. If we don’t address this, all the effort we’ve put into building this library might get overlooked, because no one has the time to dig into what exactly isn’t covered, they’ll just see that the test coverage is low. Thank you so much, and I apologize for the delayed response. |
|
I understand, but code coverage is for library code not test code, can you configure it to exclude test projects/directory? |
|
Looks good bro, I’m doing the final review of your code. |
|
Thank you for helping in the development of this library. |
Fixes #40
I've created unit tests to replicate the issue and they all pass including integration tests.