public void Should_notify_starting_and_finishing_each_class()
        {
            var testRun = new TestRun();
            var testClass1 = testRun.AddClass("TestNamespace.TestClass1");
            testClass1.AddPassingTest("TestMethod");
            var testClass2 = testRun.AddClass("TestNamespace.TestClass2");
            testClass2.AddPassingTest("OtherTestMethod");

            testRun.Run();

            testRun.Messages.OfTask(testClass1.ClassTask).AssertOrderedActions(ServerAction.TaskStarting, ServerAction.TaskFinished);
            testRun.Messages.OfTask(testClass2.ClassTask).AssertOrderedActions(ServerAction.TaskStarting, ServerAction.TaskFinished);
        }
Beispiel #2
0
        public void Should_notify_starting_and_finishing_each_class()
        {
            var testRun    = new TestRun();
            var testClass1 = testRun.AddClass("TestNamespace.TestClass1");

            testClass1.AddPassingTest("TestMethod");
            var testClass2 = testRun.AddClass("TestNamespace.TestClass2");

            testClass2.AddPassingTest("OtherTestMethod");

            testRun.Run();

            testRun.Messages.AssertSameTask(testClass1.ClassTask).OrderedActions(ServerAction.TaskStarting, ServerAction.TaskFinished);
            testRun.Messages.AssertSameTask(testClass2.ClassTask).OrderedActions(ServerAction.TaskStarting, ServerAction.TaskFinished);
        }
        public void Should_continue_running_classes_after_test_class_failure()
        {
            var testRun = new TestRun();
            var testClass1 = testRun.AddClass("TestNamespace.TestClass1");
            testClass1.AddFixture<ThrowingFixture>();
            testClass1.AddPassingTest("TestMethod");

            var testClass2 = testRun.AddClass("TestNamespace.TestClass2");
            testClass2.AddPassingTest("OtherTestMethod");

            testRun.Run();

            testRun.Messages.OfTask(testClass1.ClassTask).AssertOrderedActions(ServerAction.TaskStarting, ServerAction.TaskFinished);
            testRun.Messages.OfTask(testClass2.ClassTask).AssertOrderedActions(ServerAction.TaskStarting, ServerAction.TaskFinished);
        }
        public void Should_continue_running_classes_after_failing_tests()
        {
            var testRun = new TestRun();
            var testClass1 = testRun.AddClass("TestNamespace.TestClass1");
            testClass1.AddFailingTest("TestMethod", new EqualException(23, 186));
            var testClass2 = testRun.AddClass("TestNamespace.TestClass2");
            testClass2.AddPassingTest("OtherTestMethod");

            testRun.Run();

            testRun.Messages.OfTask(testClass1.ClassTask).AssertTaskStarting();
            testRun.Messages.OfTask(testClass1.ClassTask).AssertTaskFinishedWithFailingChildren();

            testRun.Messages.OfTask(testClass2.ClassTask).AssertTaskStarting();
            testRun.Messages.OfTask(testClass2.ClassTask).AssertTaskFinishedSuccessfully();
        }
Beispiel #5
0
        public void Should_continue_running_classes_after_test_class_failure()
        {
            var testRun    = new TestRun();
            var testClass1 = testRun.AddClass("TestNamespace.TestClass1");

            testClass1.AddFixture <ThrowingFixture>();
            testClass1.AddPassingTest("TestMethod");

            var testClass2 = testRun.AddClass("TestNamespace.TestClass2");

            testClass2.AddPassingTest("OtherTestMethod");

            testRun.Run();

            testRun.Messages.AssertSameTask(testClass1.ClassTask).OrderedActions(ServerAction.TaskStarting, ServerAction.TaskFinished);
            testRun.Messages.AssertSameTask(testClass2.ClassTask).OrderedActions(ServerAction.TaskStarting, ServerAction.TaskFinished);
        }
Beispiel #6
0
        public void Should_continue_running_classes_after_failing_tests()
        {
            var testRun    = new TestRun();
            var testClass1 = testRun.AddClass("TestNamespace.TestClass1");

            testClass1.AddFailingTest("TestMethod", new EqualException(23, 186));
            var testClass2 = testRun.AddClass("TestNamespace.TestClass2");

            testClass2.AddPassingTest("OtherTestMethod");

            testRun.Run();

            testRun.Messages.AssertSameTask(testClass1.ClassTask).TaskStarting();
            testRun.Messages.AssertSameTask(testClass1.ClassTask).TaskFinished();

            testRun.Messages.AssertSameTask(testClass2.ClassTask).TaskStarting();
            testRun.Messages.AssertSameTask(testClass2.ClassTask).TaskFinished();
        }
        public void Should_notify_class_start()
        {
            testRun.Run();

            testRun.Messages.OfTask(testClass.ClassTask).AssertTaskStarting();
        }
 protected void Run()
 {
     testRun.Run(ResultInspector);
 }
        public void Should_start_class()
        {
            testRun.Run();

            testRun.Messages.AssertSameTask(testClass.ClassTask).TaskStarting();
        }