public override TestResult Run(EventListener listener, IFilter filter) { TestSuiteResult suiteResult = new TestSuiteResult(this, Name); listener.SuiteStarted(this); long startTime = DateTime.Now.Ticks; if (ShouldRun) { suiteResult.Executed = true; DoSetUp(suiteResult); RunAllTests(suiteResult, listener, filter); DoTearDown(suiteResult); } else { suiteResult.NotRun(this.IgnoreReason); } long stopTime = DateTime.Now.Ticks; double time = ((double)(stopTime - startTime)) / (double)TimeSpan.TicksPerSecond; suiteResult.Time = time; listener.SuiteFinished(suiteResult); return(suiteResult); }
private void MarkTestNotRun( Test test, RunState runState, string ignoreReason, TestSuiteResult suiteResult, EventListener listener, ITestFilter filter) { if (test is TestSuite) { listener.SuiteStarted(test.TestName); TestSuiteResult result = new TestSuiteResult(new TestInfo(test), test.TestName.FullName); result.NotRun(runState, ignoreReason, null); MarkTestsNotRun(test.Tests, runState, ignoreReason, suiteResult, listener, filter); suiteResult.AddResult(result); listener.SuiteFinished(result); } else { listener.TestStarted(test.TestName); TestCaseResult result = new TestCaseResult(new TestInfo(test)); result.NotRun(runState, ignoreReason, null); suiteResult.AddResult(result); listener.TestFinished(result); } }
private void MarkTestNotRun( Test test, RunState runState, string ignoreReason, TestSuiteResult suiteResult, EventListener listener, ITestFilter filter) { if (test is TestSuite) { listener.SuiteStarted(test.TestName); TestSuiteResult result = new TestSuiteResult( new TestInfo(test), test.TestName.FullName); result.NotRun( runState, ignoreReason, null ); MarkTestsNotRun(test.Tests, runState, ignoreReason, suiteResult, listener, filter); suiteResult.AddResult(result); listener.SuiteFinished(result); } else { listener.TestStarted(test.TestName); TestCaseResult result = new TestCaseResult( new TestInfo(test) ); result.NotRun( runState, ignoreReason, null ); suiteResult.AddResult(result); listener.TestFinished(result); } }
public override TestResult Run(EventListener listener, IFilter filter) { TestSuiteResult suiteResult = new TestSuiteResult(this, Name); listener.SuiteStarted(this); long startTime = DateTime.Now.Ticks; if ( ShouldRun ) { suiteResult.Executed = true; DoSetUp( suiteResult ); RunAllTests( suiteResult, listener, filter ); DoTearDown( suiteResult ); } else suiteResult.NotRun(this.IgnoreReason); long stopTime = DateTime.Now.Ticks; double time = ((double)(stopTime - startTime)) / (double)TimeSpan.TicksPerSecond; suiteResult.Time = time; listener.SuiteFinished(suiteResult); return suiteResult; }