ReSharper 2024.3 Help

Code inspection: NUnit. Specified values are not compatible with the test parameter type.

This inspection notifies you about mismatch of a value in the test data of a parameterized test and the type of the corresponding parameter in the test method.

In the example below, the first two arguments from and to of the Range attribute are compatible with the parameter type int, but the value of the third argument step, makes the resulting test values incompatible with int:

[Test] public void MyTest( // The type 'double' provided in [Range] // is not compatible with the test parameter type 'int' [Range(1, 10, 0.2)] int x) { // do something }
Last modified: 11 February 2024