示例#1
0
 public void Should_not_complete_a_Failed_event_until_the_begin_event_arrives()
 {
     TestResultAggregator.Handle(new TestExecutionMethodFailedClientEvent {
         NamespaceName = "n", ClassName = "c", MethodName = "m1"
     });
     TestResultAggregator.CurrentReport.TotalPassed.ShouldEqual(0);
     TestResultAggregator.Handle(new TestExecutionMethodBeginClientEvent {
         NamespaceName = "n", ClassName = "c", MethodName = "m1"
     });
     TestResultAggregator.CurrentReport.TotalFailed.ShouldEqual(1);
 }
示例#2
0
            protected override void Because()
            {
                base.Because();
                TestResultAggregator.Handle(new TestExecutionMethodBeginClientEvent
                {
                    ClassName     = "Class name test",
                    MethodName    = "method name test",
                    NamespaceName = "namespace test",
                });
                TestResultAggregator.Handle(_testExecutionMethodPassedClientEvent);

                _passedResultServerEvent =
                    TestResultAggregator
                    .CurrentReport
                    .TestResults.Where(w => w.ResultType == ResultType.Passed)
                    .Cast <TestCaseResultServerEvent>()
                    .FirstOrDefault();
            }
示例#3
0
            protected override void Because()
            {
                base.Because();

                TestResultAggregator.Handle(new TestExecutionMethodBeginClientEvent {
                    NamespaceName = "n", ClassName = "c", MethodName = "m0"
                });
                TestResultAggregator.Handle(new TestExecutionMethodPassedClientEvent {
                    NamespaceName = "n", ClassName = "c", MethodName = "m0"
                });

                TestResultAggregator.Handle(new DialogAssertionServerEvent(DialogType.MessageBox)
                {
                    Message = "some message here"
                });

                _manufacturedFailedEvent = _manufacturedFailedEvents.FirstOrDefault();
            }
示例#4
0
            public void Should_have_attached_testContext_metadata_after_a_passed_event_has_gone_through()
            {
                TestResultAggregator.Handle(new TestContextMessageClientEvent {
                    FullTestName = "n.c.m0", Message = "Sample WriteLine"
                });
                TestResultAggregator.Handle(new TestExecutionMethodPassedClientEvent {
                    NamespaceName = "n", ClassName = "c", MethodName = "m0"
                });
                TestResultAggregator.CurrentReport.TotalPassed.ShouldEqual(0);
                TestResultAggregator.Handle(new TestExecutionMethodBeginClientEvent {
                    NamespaceName = "n", ClassName = "c", MethodName = "m0"
                });
                TestResultAggregator.CurrentReport.TotalPassed.ShouldEqual(1);

                TestResultAggregator.CurrentReport.TestResults.First().Metadata.Count().ShouldEqual(1, "Should have placed an item into the metadata collection");
                TestResultAggregator.CurrentReport.TestResults.First().Metadata.First().Classification.ShouldEqual("TestContextWriteMethod");
                TestResultAggregator.CurrentReport.TestResults.First().Metadata.First().Name.ShouldEqual("TestContextWriteMethod");
                TestResultAggregator.CurrentReport.TestResults.First().Metadata.First().Value.ShouldEqual("Sample WriteLine");
            }
示例#5
0
            protected override void Because()
            {
                base.Because();

                TestResultAggregator.Handle(_browserHostCommunicationTimeoutServerEvent);
            }