-
-
Notifications
You must be signed in to change notification settings - Fork 840
Replace MOQ with NSubstitute #1390
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
Due to the debacle seen over in the MOQ project around the exfiltration of user data, use NSubstiture in favour of MOQ
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1390 +/- ##
===========================================
- Coverage 78.49% 78.44% -0.06%
===========================================
Files 199 201 +2
Lines 5706 5715 +9
Branches 1166 1169 +3
===========================================
+ Hits 4479 4483 +4
- Misses 714 717 +3
- Partials 513 515 +2 ☔ View full report in Codecov by Sentry. |
Thanks! I'm going to hold on this a moment and see how this pans out. The current version we're referencing doesn't have the privacy issues noted and, from a short term perspective, we can always just pin |
No trouble at all, thanks for the speedy response. |
|
||
contextMock.Verify(context => context.Instance, Times.Once); | ||
contextMock.Verify(context => context.Registration.Options, Times.Once); | ||
_ = contextMock.Received(1).Instance; |
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 discard construct reads kind of weird. Is there an error of some nature if the discard part is omitted?
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.
Good spot! My mistake.
|
||
resolveRequestContextMock.Verify(context => context.Operation.RequestDepth, Times.Never); | ||
_ = resolveRequestContextMock.Received().Operation.RequestDepth; |
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.
Looks like there's another of those discard items here.
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.
Corrected, as requested.
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.
Thanks again, this is great!
You're welcome, pleasure to work with you. |
As per the huge discussion chain here:
https://github.com/moq/moq/issues/1372
Replace MOQ with NSubstitute