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
A test marked with the [DataTestMethod] attribute cannot have a generic parameter. It will not be recognized by the test runner.
Steps To Reproduce
[TestClass]
public class GTest
{
[DataTestMethod]
[DataRow((byte)10)]
[DataRow((short)11)]
[DataRow((long)12)]
[DataRow((ulong)13)]
public void GenericTest<T>(T value)
{
List<T> list = new List<T>(new[] {value});
Assert.AreEqual<T>(value, list[0]);
}
}
Expected behavior
The test framework should invoke the method of type T with the correct type of the given argument in DataRow.
Actual behavior
The test framework ignores the whole test.
Additional context
Ran into this limitation while migrating my LsMsgPack project from NUnit to MsTest. The last 100 or so tests in MpIntTest.cs are ignored. The old tests in Nunit are working.
The text was updated successfully, but these errors were encountered:
Describe the bug
A test marked with the [DataTestMethod] attribute cannot have a generic parameter. It will not be recognized by the test runner.
Steps To Reproduce
Expected behavior
The test framework should invoke the method of type T with the correct type of the given argument in DataRow.
Actual behavior
The test framework ignores the whole test.
Additional context
Ran into this limitation while migrating my LsMsgPack project from NUnit to MsTest. The last 100 or so tests in MpIntTest.cs are ignored. The old tests in Nunit are working.
The text was updated successfully, but these errors were encountered: