I am trying to break the unit test class into logical groupings based on a specific scenario. However, I need to have TestFixtureSetUp
and TestFixtureTearDown
, which will be executed for the whole test. Basically I need to do something like this:
[TestFixture] class Tests { private Foo _foo;
In this case, I get a NullReferenceException on _foo
presumably because TearDown is called before the inner class is executed.
How can I achieve the desired effect (review of tests)? Is there an extension or something in NUnit that I can use that helps? I would rather stick with NUnit at this time and not use something like SpecFlow.
source share