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

Add the support of static Mock.Verify() / Mock.VerifyAll() methods for the rule PosInfoMoq1000. #20

Closed
GillesTourreau opened this issue Jun 13, 2024 · 0 comments · Fixed by #24
Assignees
Milestone

Comments

@GillesTourreau
Copy link
Contributor

The support of the Mock.Verify() / Mock.VerifyAll() must be added in the PosInfoMoq1000 rule.

Currently the following scenario raise a warning:

public void Test()
{
   var mock = new Mock<I>(MockBehavior.Strict);

   Mock.VerifyAll(mock);   // The mock is verified, so no warning should be raised at the instantiation level.
}
image
@GillesTourreau GillesTourreau added this to the v1.6.0 milestone Jun 13, 2024
@GillesTourreau GillesTourreau self-assigned this Jun 13, 2024
GillesTourreau added a commit that referenced this issue Jun 13, 2024
@GillesTourreau GillesTourreau linked a pull request Jun 24, 2024 that will close this issue
@GillesTourreau GillesTourreau mentioned this issue Jun 24, 2024
@GillesTourreau GillesTourreau mentioned this issue Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant