我有测试功能:
[TestMethod()]
public void CreateTest(string input)
{
string expected = "321";
Assert.AreEqual(expected, input);
}
I need to run this test with different data: CreateTest("321"); CreateTest("123"); CreateTest(null);
I do not know how to do this before I did something like [TestCase("123")], [TestCase("321")]
我需要的东西:
[RowTest]
[Row(1,1,2)]
[Row(2,1,3)]
[Row(1,-1,0)]
public void SumTest(int a1, int a2, int result)
{
Assert.AreEqual(a1 + a2, result);
}