ReSharper
 
Get ReSharper
You are viewing the documentation for an earlier version of ReSharper.

Code Inspection: NUnit. No values provided in the attributes

Last modified: 21 July 2022

Starting from NUnit 3.0, you can use the Values Attribute without any arguments with parameters of the type enum and bool to use all possible values of the enumeration in the test. NUnit 3.11 extends this functionality to enum? and bool?.

If [Values] without arguments is used for other parameter types, the test will do nothing:

This inspection will also issue a warning if you use [Values] without arguments with an enum or a bool parameter and the current NUnit version is earlier that 3.0.

Similarly, it will warn you if you use [Values] without arguments with an enum? or a bool? parameter, and NUnit earlier that 3.11.