JetBrains Rider
 
2024.1
Get JetBrains Rider
You are viewing the documentation for an earlier version of JetBrains Rider.

Code inspection: NUnit. Redundant argument instead of ExpectedResult.

Last modified: 08 April 2024

The arguments of NUnit's TestCase attribute can be used for providing both values for test parameters and the expected result of the test. The expected result must be always specified by using the named parameter ExpectedResult.

If the test method returns a value and JetBrains Rider finds an argument with a data value instead of ExpectedResult, it issues a warning and provides a quick-fix that converts the value to the expected result.