public void Should_publish_passing_test_that_has_previously_failed() { _cache.Stub(x => x.Failed).Return(new TestItem[] { new TestItem("", "", new AutoTest.Messages.TestResult(TestRunner.NUnit, TestRunStatus.Failed, "PreviouslyFailingTest")) }); _feedback.TestFinished(new AutoTest.TestRunners.Shared.Results.TestResult("", "", "", 0, "PreviouslyFailingTest", AutoTest.TestRunners.Shared.Results.TestState.Passed, "")); _bus.AssertWasCalled(x => x.Publish <LiveTestStatusMessage>(null), x => x.IgnoreArguments()); }
public void Should_run_cached_failed_and_ignored_tests_and_mark_for_rerun() { _resultCache.Stub(r => r.Failed).Return(new TestItem[] { new TestItem("assembly", "project", new TestResult(TestRunner.MSTest, TestRunStatus.Failed, "sometests")) }); _resultCache.Stub(r => r.Ignored).Return(new TestItem[] { new TestItem("assembly", "project", new TestResult(TestRunner.NUnit, TestRunStatus.Ignored, "someignoredtests")) }); var details = new RunInfo(new Project("project", new ProjectDocument(ProjectType.CSharp))); details.SetAssembly("assembly"); _preProcessor.PreProcess(new PreProcessedTesRuns(null, new RunInfo[] { details })); details.GetTests().Length.ShouldEqual(2); details.GetTests()[0].Test.ShouldEqual("sometests"); details.GetTests()[1].Test.ShouldEqual("someignoredtests"); details.OnlyRunSpcifiedTestsFor(TestRunner.Any).ShouldBeTrue(); details.RerunAllTestWhenFinishedFor(TestRunner.Any).ShouldBeTrue(); }