c# nunit setup teardown code example
Example: setup and teardown nunit
public class BaseClass
{
[SetUp]
public void BaseSetUp() { ... } // Exception thrown!
[TearDown]
public void BaseTearDown() { ... }
}
[TestFixture]
public class DerivedClass : BaseClass
{
[SetUp]
public void DerivedSetUp() { ... }
[TearDown]
public void DerivedTearDown() { ... }
[Test]
public void TestMethod() { ... }
}