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. Test case source must be non-abstract and implement IEnumerable.

Last modified: 11 February 2024

NUnit's TestCaseSource attribute is used to identify the source from which the argument(s) will be provided for a parameterized test. The class that provides test cases must have a default constructor and implement IEnumerable. If the test source class does not implement IEnumerable, ReSharper issues a warning.

Note that NUnit allows different ways of specifying test case sources. For more information, refer to the TestCaseSourceAttribute documentation.