Beispiel #1
0
        public void the_get_text_method_calls_relevant_outputs_in_order()
        {
            var output1 = MockRepository.GenerateMock <IRecordedHttpOutput>();
            var output2 = MockRepository.GenerateMock <IRecordedHttpOutput, IRecordedTextOutput>();
            var output3 = MockRepository.GenerateMock <IRecordedHttpOutput>();
            var output4 = MockRepository.GenerateMock <IRecordedHttpOutput, IRecordedTextOutput>();

            addOutputs(output1, output2, output3, output4);
            theRecordedOutput.GetText();

            output2.As <IRecordedTextOutput>().AssertWasCalled(x => x.WriteText(Arg <StringWriter> .Is.NotNull));
            output4.As <IRecordedTextOutput>().AssertWasCalled(x => x.WriteText(Arg <StringWriter> .Is.NotNull));
        }
Beispiel #2
0
 public void should_nest_correctly_when_recording_1()
 {
     theNestedOutput.GetText().ShouldEqual(theNestedContent);
 }