You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When overriding a test decorated with the TestDataAttribute all the datarows on the base will also be executed. This makes overriding a test quite useless.
Steps to reproduce
[TestClass]
public class Test
{
[DataTestMethod]
[DataRow("cherry")]
[DataRow("banana")]
[DataRow("Apple")]
public virtual void TestMethod(string a)
{
Assert.IsTrue(true);
}
}
[TestClass]
public class MyTest : Test
{
[DataTestMethod]
[DataRow("orange")]
[DataRow("pineapple")]
public override void TestMethod(string a)
{
Assert.IsTrue(true);
}
}
Description
When overriding a test decorated with the TestDataAttribute all the datarows on the base will also be executed. This makes overriding a test quite useless.
Steps to reproduce
Expected behavior
MyTest (2 tests) [0:00.004] Success
TestMethod (2 tests) [0:00.004] Success
TestMethod (orange) [0:00.004] Success
TestMethod (pineapple) [0:00.000] Success
Test (3 tests) [0:00.005] Success
TestMethod (3 tests) [0:00.005] Success
TestMethod (Apple) [0:00.000] Success
TestMethod (banana) [0:00.000] Success
TestMethod (cherry) [0:00.005] Success
Actual behavior
MyTest (5 tests) [0:00.006] Success
TestMethod (5 tests) [0:00.006] Success
TestMethod (Apple) [0:00.000] Success
TestMethod (banana) [0:00.000] Success
TestMethod (cherry) [0:00.000] Success
TestMethod (orange) [0:00.006] Success
TestMethod (pineapple) [0:00.000] Success
Test (3 tests) [0:00.007] Success
TestMethod (3 tests) [0:00.007] Success
TestMethod (Apple) [0:00.000] Success
TestMethod (banana) [0:00.000] Success
TestMethod (cherry) [0:00.007] Success
Environment
Desired functionality was with version 1.1.18
changed behavior started with 1.2.0 beta and onwards
The text was updated successfully, but these errors were encountered: