[TestFixture]
public class SomeTests
{
[TestFixtureSetUp]
public void RunBeforeAllTests()
{
Console.WriteLine( “TestFixtureSetUp” );
}
[TestFixtureTearDown]
public void RunAfterAllTests()
{
Console.WriteLine( “TestFixtureTearDown” );
}
[SetUp]
public void RunBeforeEachTest()
{
Console.WriteLine( “SetUp” );
}
[TearDown]
public void RunAfterEachTest()
{
文章来源于领测软件测试网 https://www.ltesting.net/