Ejemplo n.º 1
0
		public virtual void TestRun()
		{
			RunsGreen greenTest = new RunsGreen();
			RunsRed redTest = new RunsRed(FailureException);
			IEnumerable tests = Iterators.Iterable(new object[] { greenTest, redTest });
			MethodCallRecorder recorder = new MethodCallRecorder();
			ITestListener listener = new _ITestListener_23(recorder);
			new TestRunner(tests).Run(listener);
			recorder.Verify(new MethodCall[] { new MethodCall("runStarted", new object[] {  }
				), new MethodCall("testStarted", new object[] { greenTest }), new MethodCall("testStarted"
				, new object[] { redTest }), new MethodCall("testFailed", new object[] { redTest
				, FailureException }), new MethodCall("runFinished", new object[] {  }) });
		}
Ejemplo n.º 2
0
        public virtual void TestRun()
        {
            RunsGreen          greenTest = new RunsGreen();
            RunsRed            redTest   = new RunsRed(FailureException);
            IEnumerable        tests     = Iterators.Iterable(new object[] { greenTest, redTest });
            MethodCallRecorder recorder  = new MethodCallRecorder();
            ITestListener      listener  = new _ITestListener_23(recorder);

            new TestRunner(tests).Run(listener);
            recorder.Verify(new MethodCall[] { new MethodCall("runStarted", new object[] {  }
                                                              ), new MethodCall("testStarted", new object[] { greenTest }), new MethodCall("testStarted"
                                                                                                                                           , new object[] { redTest }), new MethodCall("testFailed", new object[] { redTest
                                                                                                                                                                                                                    , FailureException }), new MethodCall("runFinished", new object[] {  }) });
        }
Ejemplo n.º 3
0
		public virtual void Test()
		{
			MethodCallRecorder recorder = new MethodCallRecorder();
			CompositeTestListener listener = new CompositeTestListener(new CompositeTestListenerTestCase.ListenerRecorder
				("first", recorder), new CompositeTestListenerTestCase.ListenerRecorder("second"
				, recorder));
			RunsGreen test = new RunsGreen();
			Exception failure = new Exception();
			listener.RunStarted();
			listener.TestStarted(test);
			listener.TestFailed(test, failure);
			listener.RunFinished();
			recorder.Verify(new MethodCall[] { Call("first.runStarted"), Call("second.runStarted"
				), Call("first.testStarted", test), Call("second.testStarted", test), Call("first.testFailed"
				, test, failure), Call("second.testFailed", test, failure), Call("first.runFinished"
				), Call("second.runFinished") });
		}
Ejemplo n.º 4
0
        public virtual void Test()
        {
            MethodCallRecorder    recorder = new MethodCallRecorder();
            CompositeTestListener listener = new CompositeTestListener(new CompositeTestListenerTestCase.ListenerRecorder
                                                                           ("first", recorder), new CompositeTestListenerTestCase.ListenerRecorder("second"
                                                                                                                                                   , recorder));
            RunsGreen test    = new RunsGreen();
            Exception failure = new Exception();

            listener.RunStarted();
            listener.TestStarted(test);
            listener.TestFailed(test, failure);
            listener.RunFinished();
            recorder.Verify(new MethodCall[] { Call("first.runStarted"), Call("second.runStarted"
                                                                              ), Call("first.testStarted", test), Call("second.testStarted", test), Call("first.testFailed"
                                                                                                                                                         , test, failure), Call("second.testFailed", test, failure), Call("first.runFinished"
                                                                                                                                                                                                                          ), Call("second.runFinished") });
        }