Skip to content

Fix S2699 FP: Support Moq #7961

@bdovaz

Description

@bdovaz

S2699

Description

The following rule supports several frameworks but Moq is not among them:

https://rules.sonarsource.com/csharp/RSPEC-2699/

As you can see in the examples, it allows to verify for example that a method or event call is made:

https://github.com/moq/moq

But not being an Assert throws this rule as a false positive and forces to do ugly things like Assert.True(true).

Repro steps

Create a minimal example of Moq by taking it from the Readme.md file in repository and see how it throws the false positive of the mentioned rule.

Metadata

Metadata

Labels

False PositiveRule IS triggered when it shouldn't be.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions