internal override void Run(Reporter reporter) { if(Format != TestFormat.Skip) { try { long beforeMemory = GC.GetTotalMemory(true); StopWatch.Restart(); RunMethod(); long elapsedTime = StopWatch.ElapsedMilliseconds; long totalMemory = beforeMemory - GC.GetTotalMemory(true); StopWatch.Stop(); Result = new TestResult(TestStatus.Passed, elapsedTime, totalMemory); reporter.CallBuildTestSuccess(this); } catch(Exception ex) { Result = new TestResult(ex); reporter.CallBuildTestFailure(this); } } else { Result = new TestResult(TestStatus.Skipped); reporter.CallBuildTestSkipped(this); } }
internal override void Run(Reporter reporter) { if(Format != TestFormat.Skip) { reporter.CallBuildTestSuiteHeader(this); Tests.Run(reporter); Result = Tests.CreateTestSuiteResult(); reporter.CallBuildTestSuiteFooter(this); } else { Result = new TestSuiteResult(TestStatus.Skipped); } }