Maintain code quality of unit tests
One of the most powerful ReSharper features, code inspection, comes in handy when you write unit tests. In addition to hundreds of general-purpose inspections, there is also a number of dedicated inspections that target problems specific to unit tests:
NUnit (30 inspections)
These inspections detect code issues related to NUnit tests.
Inspection | |
---|---|
NUnit. Cannot resolve symbol in TestCaseSource or ValueSource attribute. | |
NUnit. Duplicate values. | |
NUnit. Ignored parameter attribute. | |
NUnit. Incompatible argument type or incorrect argument value. | |
NUnit. Incompatible expected result type or incorrect value. | |
NUnit. Incorrect range bounds. 'to' must be greater than or equal to 'from'. | |
NUnit. Specified values are not compatible with the test parameter type. | |
NUnit. Test case source must be non-abstract and implement IEnumerable. | |
NUnit. The maximum range value is not reachable with the step value. | |
NUnit. Values in range do not fit the type of the test parameter. | |
NUnit.AutoFixture. Incompatible argument type or incorrect argument value. | |
NUnit.AutoFixture. Missing Test or TestFixture attribute. | |
NUnit.AutoFixture. Redundant argument in InlineAutoData attribute. |
Xunit (1 inspection)
These inspections detect code issues related to xUnit.Net tests.