除方法可设置Category,连TestFixture都可以设置Category,如,对于一些整个TestFixture都测试时间都很长的,就可将它设置为[Category"Long")],这样就没有必要重复标记每个测试方法了。
9.每个测试的运行都应该是互相独立的;可在任何时候,任意顺序运行每个单独的测试。
10.NUint中Per-method :Setup与Teardown
[SetUp] //用于测试环境的建立
public void MySetup()
{
//do something.
}
[TearDown] //清除测试环境
public void MyTeardown()
{
//do something.
}
//如测试是否抛出ArgumentException
[Test, ExpectedException(typeof(ArgumentException))]
public void TestForException() 

{
Do.GetSomething(null);
//Shouldn's get to here;
}
[Test, Ignore("Not run this method")]
public void TestMethod()

{
//do something
}
