public ReportCounter GetCounter() { ReportCounter counter = new ReportCounter(); foreach(Fixture fixture in this) counter.AddCounts(fixture.GetCounter()); return counter; }
public void AddCounts(ReportCounter right) { if (right==null) throw new ArgumentNullException("right"); this.RunCount += right.RunCount; this.SuccessCount += right.SuccessCount; this.FailureCount += right.FailureCount; this.IgnoreCount += right.IgnoreCount; this.SkipCount += right.SkipCount; this.AssertCount += right.AssertCount; this.Duration += right.Duration; }
public void AddCounts(ReportCounter right) { if (right == null) { throw new ArgumentNullException("right"); } this.RunCount += right.RunCount; this.SuccessCount += right.SuccessCount; this.FailureCount += right.FailureCount; this.IgnoreCount += right.IgnoreCount; this.SkipCount += right.SkipCount; this.AssertCount += right.AssertCount; this.Duration += right.Duration; }
public ReportCounter GetCounter() { ReportCounter counter = new ReportCounter(); counter.RunCount = this.Starters.Count; foreach (RunPipeStarter starter in this.Starters) { if (starter.HasResult) { switch (starter.Result.Result) { case ReportRunResult.Success: ++counter.SuccessCount; break; case ReportRunResult.Failure: ++counter.FailureCount; break; case ReportRunResult.Ignore: ++counter.IgnoreCount; break; } } } return counter; }
public void LoadAndRunFixtures() { this.CreateAssembly(); // load assembly using(TestDomain domain = new TestDomain(this.compiler.Parameters.OutputAssembly)) { domain.ShadowCopyFiles = false; domain.InitializeEngine(); foreach (string dir in this.Compiler.Parameters.ReferencedAssemblies) domain.TestEngine.AddHintDirectory(dir); domain.PopulateEngine(); Console.WriteLine("Domain loaded"); Console.WriteLine("Tree populated, {0} tests", domain.TestEngine.GetTestCount()); // Assert.AreEqual(1, domain.TestTree.GetTestCount()); // domain.TestTree.Success+=new MbUnit.Core.RunSuccessEventHandler(TestTree_Success); // running tests domain.TestEngine.RunPipes(); // display report TextReport report = new TextReport(); result = domain.TestEngine.Report.Result; report.Render(result,Console.Out); counter = domain.TestEngine.GetTestCount(); } }
public ReportCounter GetTestCount() { ReportCounter count = new ReportCounter();; foreach(TreeTestDomain domain in this.list) { if (domain.TestEngine == null) continue; count.AddCounts(domain.TestEngine.GetTestCount()); } return count; }
public ReportCounter GetCounter() { ReportCounter counter = new ReportCounter(); foreach (FixtureVertex v in this.graph.Vertices) { counter.AddCounts(v.Fixtures.GetCounter()); } return counter; }
public void ResetTests() { this.Counter.Clear(); if (this.tree!=null) { this.counter = this.Tree.TestDomains.GetTestCount(); } }