-
Notifications
You must be signed in to change notification settings - Fork 790
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
Remove Moq dependency #5106
Remove Moq dependency #5106
Conversation
Another option could be to use |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5106 +/- ##
==========================================
+ Coverage 83.10% 83.17% +0.07%
==========================================
Files 296 296
Lines 12318 12318
==========================================
+ Hits 10237 10246 +9
+ Misses 2081 2072 -9
Flags with carried forward coverage won't be shown. Click here to find out more. |
The approach you have looks good to me. We should avoid any additional dependency. (And in this case we can). |
@vishweshbankwar : To remove the dependency to NSubstitute, more work needs to be done. |
@ngruson We would like to avoid dependency on both NSubstitute and Mock. I'd suggest to tackle this one project at a time. For the current PR, lets scope this to Http one (as you had earlier) and move on to others in separate PRs. Does that sound ok? |
FYI - this PR is related to this issue: #4758 (comment) |
💯 |
Refactor unit tests in order to remove the
Moq
dependency.Changes
Mocks of
TextMapPropagator
have been removed.I've introduced a
CustomTextMapPropagator
to be able to inject arbitrary key value pairs in the context of a unit test.@vishweshbankwar : can you agree with this approach?
The dependency to the Moq package has been removed from all the test projects.
Mocking is now done using NSubstitute where needed.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes