public override void DoFixtureTearDown(TestResult suiteResult) { if (ShouldRun) { try { Status = SetUpState.SetUpNeeded; _fixture.FixtureTeardown(); } catch (Exception ex) { NunitException nex = ex as NunitException; if (nex != null) { ex = nex.InnerException; } suiteResult.Failure(ex.Message, ex.StackTrace); } finally { if (testFramework != null) { suiteResult.AssertCount += testFramework.GetAssertCount(); } } } }
public void RunSetupAndTeardowns() { MyPythonSuite suite = new MyPythonSuite(); suite.Setup(); PythonFixtureBuilder builder = new PythonFixtureBuilder(suite.Engine); PythonFixture fixture = builder.BuildFixtures()[0]; fixture.FixtureSetup(); fixture.Setup(); fixture.Teardown(); fixture.FixtureTeardown(); }