Tag: testcase

MSTest是否与NUnit的TestCase相当?

我发现NUnit中的TestCase特性作为快速指定testing参数非常有用,而不需要每个testing都有一个单独的方法。 MSTest中有类似的东西吗? [TestFixture] public class StringFormatUtilsTest { [TestCase("tttt", "")] [TestCase("", "")] [TestCase("t3a4b5", "345")] [TestCase("3&5*", "35")] [TestCase("123", "123")] public void StripNonNumeric(string before, string expected) { string actual = FormatUtils.StripNonNumeric(before); Assert.AreEqual(expected, actual); } }