public virtual void doRun(TestCaseResult testResult) { DateTime start = DateTime.Now; try { _fixture.Setup(); doTestCase(testResult); } catch (Exception ex) { if (ex is NunitException) { ex = ex.InnerException; } RecordException(ex, testResult); } finally { doTearDown(testResult); DateTime stop = DateTime.Now; TimeSpan span = stop.Subtract(start); testResult.Time = (double)span.Ticks / (double)TimeSpan.TicksPerSecond; } }
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(); }