public virtual void Test()
        {
            var recorder = new MethodCallRecorder();

            Run(new _FixtureBasedTestSuite_45(recorder));
            //		System.out.println(CodeGenerator.generateMethodCallArray(recorder));
            recorder.Verify(new[]
            {
                new MethodCall("testFoo", new object[]
                {
                    "f11"
                    , "f21"
                }),
                new MethodCall("testFoo", new object[] { "f11", "f22" }), new MethodCall
                    ("testFoo", new object[] { "f12", "f21" }),
                new MethodCall("testFoo", new object
                               [] { "f12", "f22" }),
                new MethodCall("testBar", new object[] { "f11", "f21" }),
                new MethodCall("testBar", new object[] { "f11", "f22" }), new MethodCall("testBar"
                                                                                         , new object[] { "f12", "f21" }),
                new MethodCall("testBar", new object[]
                {
                    "f12"
                    , "f22"
                })
            });
        }
예제 #2
0
		private void AssertSimpleDb4o(IDb4oFixture fixture)
		{
			IEnumerator tests = new Db4oTestSuiteBuilder(fixture, typeof(SimpleDb4oTestCase))
				.GetEnumerator();
			ITest test = NextTest(tests);
			MethodCallRecorder recorder = new MethodCallRecorder();
			SimpleDb4oTestCase.RecorderVariable.With(recorder, new _IRunnable_46(test));
			recorder.Verify(new MethodCall[] { new MethodCall("fixture", new object[] { fixture
				 }), new MethodCall("configure", new object[] { MethodCall.IgnoredArgument }), new 
				MethodCall("store", new object[] {  }), new MethodCall("testResultSize", new object
				[] {  }) });
		}
예제 #3
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[] {  }) });
        }
예제 #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") });
        }
예제 #5
0
 public virtual void Verify(MethodCall[] calls)
 {
     producerCalls.Verify(calls);
 }
예제 #6
0
 public virtual void Verify(MethodCall[] expectedCalls)
 {
     _recorder.Verify(expectedCalls);
 }
예제 #7
0
 public void Verify(params MethodCall[] expectedCalls)
 {
     _recorder.Verify(expectedCalls);
 }