我对NUnit功能的理解有点问题,阅读文档并没有帮助我:D 所以,我有什么:
我想并行运行每个TestFixture,但不测试方法。
[SetUpFixture]
public abstract class BaseSetUpFixture
{
[OneTimeSetUp]
// database creation
[OneTimeTearDown]
// database deleting
protected void MakeTestThroughDatabase(Action<DbContext> action)
{
// perform test
}
}
[TestFixture]
public class SomeTests : BaseSetUpFixture
{
[Test]
[Test]
[Test]
}
[TestFixture]
public class SomeOtherTests : BaseSetUpFixture
{
[Test]
[Test]
[Test]
}
感谢关注:)