示例#1
0
        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;
            }
        }
示例#2
0
        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();
        }