nunit.analyzers
nunit.analyzers copied to clipboard
Analyzer for TestCaseSource does not check Test method parameters
The TestCaseUsageAnalyzer
warns if the test method doesn't have the same number of parameters.
The TestCaseSourceUsesStringAnalyzer
only test if the parameters for the test source method match.
Either create a new or add to the existing TestCaseSourceUsesStringAnalyzer
code to check test parameters.
private static readonly IEnumerable<string> NUnitNameSpaces = new[] { ".NUnit", ".NUnitExtensions" };
[TestCaseSource(nameof(NUnitNameSpaces))]
public void IsNUnit()
{
}
This should raise an issue that the test method doesn't expect parameters.