Equivalent to NUnit TestCaseAttribute in VS Unit Test Framework

Is there a NUnit TestCaseAttribute equivalent in Visual Studio 2008 unit test framework ?

You know something like this:

[TestCase(1, 1, 1)]
[TestCase(2, 2, 2)]
[TestCase(3, 3, 3)]
public void Test1(int a, int b, int c) 
{ 
    // do stuff depending on the TestCase 
}
+3
source share
1 answer

MSTest, unfortunately, does not support parameterized tests in this way. The DataSource attribute closest to you , which allows you to specify the external data source for the test method.

+2
source

Source: https://habr.com/ru/post/1736173/


All Articles