-
Notifications
You must be signed in to change notification settings - Fork 231
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
Rule S2699 - Fix FP: NUnit test method using [Test(ExpectedResult=)] raises rule violation #5702
Comments
I can confirm this issue. Easy to reproduce, easy to fix. |
@costin-zaharia-sonarsource This issue can be closed?! |
Is this fix already released? I still get that error in the same case with v6.6.0.49766 in Visual Studio. |
@rklec Yes it has. |
Okay, great! So which version contains the fix then? As I said, I could still reproduce it in v6.6.0.49766. |
This was fixed by @Corniel in the Edit: the first ticket is now redundant as we have released |
Description
S2699 is raised for NUnit tests which use the
ExpectedResult
property on aTestAttribute
to specify the expected result value, rather than specify an assertion in the method body.Repro steps
Expected behavior
S2699 is not raised.
Actual behavior
S2699 is raised.
Known workarounds
Avoid this particular pattern and use an assertion in the method body; or suppress the rule.
Related information
The text was updated successfully, but these errors were encountered: