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. Values in range do not fit the type of the test parameter.

Last modified: 11 February 2024

If the minimum or the maximum value specified in the from and to arguments of the NUnit's Range Attribute is beyond the limit of the test parameter type, the test will not work properly. In NUnit 2.x tests with out-of-the-bounds values will not be executed. In NUnit 3.x the test will fail with the Out of range error.