ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code inspection: NUnit. Test case Result property is obsolete.

Last modified: 11 February 2024

Starting from NUnit 2.6.2, the named parameter Result of the TestCase Attribute, which you can use to specify the expected result to be returned from the test method, becomes deprecated in favor of the ExpectedResult parameter, which serves the same purpose.

Starting from NUnit 3.0, Result is not supported anymore and any tests that use this parameter will not compile with NUnit 3.0.

This inspection detects usages of the Result parameter and suggests replacing them with ExpectedResult.