ReSharper 2023.2 Help

Code Inspection: NUnit. Test case Result property is obsolete

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.

// 'Result' is obsolete and should be replaced with 'ExpectedResult' [TestCase(12, 3, Result = 4)] public int DivideTest(int n, int d) { return (n / d); }
Last modified: 08 March 2021