/// 声明为TestFixtureTearDown的方法将在所有选中的TestCase调用之后调用,通常用来销毁数据库连接
///
[TestFixtureTearDown]
public void DestroyUtility()
{
Console.Write("Caculator Destroy!");
}
[SetUp]
public void Init()
{
cac = new Caculator();
a = 10;
b = 2;
Console.Write("Data Init!");
}
[TearDown]
public void Destroy()
{
Console.Write("TestCase Destroy!");
}
[Test]
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/