public void Should_not_remove_tests_from_different_runners() { var cache = new RunResultCache(); cache.EnabledDeltas(); var results = new TestRunResults("project", "assembly", false, TestRunner.NUnit, new TestResult[] { new TestResult(TestRunner.NUnit, TestRunStatus.Failed, "Test1"), }); cache.Merge(results); var mah = cache.PopDeltas(); mah.AddedTests.Length.ShouldEqual(1); var infos = new TestRunInfo[] { new TestRunInfo(new Project("project", new ProjectDocument(ProjectType.CSharp)), "assembly") }; results = new TestRunResults("project", "assembly", false, TestRunner.XUnit, new TestResult[] { new TestResult(TestRunner.XUnit, TestRunStatus.Failed, "Test1"), }); var locator = new RemovedTestsLocator(cache); results = locator.SetRemovedTestsAsPassed(results, infos); cache.Merge(results); results.Passed.Length.ShouldEqual(0); var meh = cache.PopDeltas(); meh.RemovedTests.Length.ShouldEqual(0); }
public void Should_find_build_error_delta() { _runResultCache.EnabledDeltas(); var results = new BuildRunResults("project"); results.AddError(new BuildMessage() { File = "some file", ErrorMessage = "some error message" }); _runResultCache.Merge(results); _runResultCache.PopDeltas(); results = new BuildRunResults("project"); results.AddError(new BuildMessage() { File = "some other file", ErrorMessage = "some other error message" }); _runResultCache.Merge(results); var deltas = _runResultCache.PopDeltas(); deltas.AddedErrors.Length.ShouldEqual(1); deltas.RemovedErrors.Length.ShouldEqual(1); }