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

New rule S2970: Assertions should be complete #6757

Merged
merged 35 commits into from Feb 27, 2023

Conversation

martin-strecker-sonarsource
Copy link
Contributor

Fixes #6662

Copy link
Contributor

@Tim-Pohlmann Tim-Pohlmann left a comment

Choose a reason for hiding this comment

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

LGTM besides some nitpicking.
Was it considered to add support for FakeItEasy?
It has some assertion calls that could be checked in a very similar manner:
A.CallTo(() => shop.BuyCandy(lollipop)).MustHaveHappened();

@martin-strecker-sonarsource
Copy link
Contributor Author

Was it considered to add support for FakeItEasy?

No. There is also moq Verify and probably others. I can not tell why NSubstitute was included, but Moq and FakeItEasy were not. We also looked into NUnit, xUnit, and Shoudly.

…uldBeComplete.NFluent.cs

Co-authored-by: Tim Pohlmann <tim.pohlmann@sonarsource.com>
@sonarcloud
Copy link

sonarcloud bot commented Feb 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Feb 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

95.2% 95.2% Coverage
0.0% 0.0% Duplication

@martin-strecker-sonarsource martin-strecker-sonarsource deleted the Martin/S2970_CompleteAssertion branch February 27, 2023 15:47
@martin-strecker-sonarsource
Copy link
Contributor Author

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 this pull request may close these issues.

New rule S2970: Assertions should be complete
2 participants