[Test,Explicit]
public void TestMinus()
{
int result = cac.Substract(a, b);
Assert.AreEqual(8, result);
}
[Test]
public void TestMultip()
{
int result = cac.Multip(a, b);
Assert.AreEqual(20, result);
}
[Test]
public void TestDivide()
{
int result = cac.Divide(a, b);
Assert.AreEqual(5, result);
}
}
}
运行结果:
3.Category的用法:测试用例分组,看看下面的代码和结果就清楚了
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/