NUnit2.5 测试类几个方法

Per-method 的Setup、Teardown 和 Per-class Setup 、TearDown

1.OneTimeSetUp() :Per-class Setup用[TestFixtureSetup]修改方法名,在所有test之前一次执行

 

2.  MySetUp(): [SetUp] setup runs before each test method.

3.    Test method 1      [Test]

4.  MyTearDown(): [TearDown] teardown runs after each test method. 

 

5.  MySetUp():  setup runs before each test method.

6.    Test method 2

7.  MyTearDown(): teardown runs after each test method. 

   .......

8.OneTimeTearDown(): Per-class TearDown,[TestFixtureTearDown]修饰方法名,在所有Test之后一次执行

 

 

 

你可能感兴趣的:(it)