Skip to content
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 #1472

Merged
merged 1 commit into from
Aug 9, 2023
Merged

Remove Moq #1472

merged 1 commit into from
Aug 9, 2023

Conversation

martincostello
Copy link
Member

@martincostello martincostello commented Aug 9, 2023

Removes Moq and replaces it with NSubstitute.

May need some tweaks to mutations and/or coverage as the previous strict mock behaviour isn't available to use.

Resolves #1470.

Remove Moq and replace with NSubstitute.
Resolves App-vNext#1470.
@martincostello martincostello added CI/build dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code labels Aug 9, 2023
@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #1472 (b91514e) into main (9674b6b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1472   +/-   ##
=======================================
  Coverage   83.88%   83.88%           
=======================================
  Files         275      275           
  Lines        6492     6492           
  Branches     1015     1015           
=======================================
  Hits         5446     5446           
  Misses        837      837           
  Partials      209      209           
Flag Coverage Δ
linux 83.88% <ø> (ø)
macos 83.88% <ø> (ø)
windows 83.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@martincostello martincostello marked this pull request as ready for review August 9, 2023 12:30
var result = new ValueTask<RateLimitLease>(_lease);
_limiter
.GetType()
.GetMethod("AcquireAsyncCore", BindingFlags.NonPublic | BindingFlags.Instance)!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:(

Was not nice even before though ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, protected mocking always looks ugly.

@martintmk
Copy link
Contributor

LGTM, the syntax is surprisingly nice!

@martincostello martincostello merged commit 855ce01 into App-vNext:main Aug 9, 2023
@martincostello martincostello deleted the remove-moq branch August 9, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/build dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace Moq
2 participants