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" }) }); }
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 [] { }) }); }
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[] { }) }); }
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") }); }
public virtual void Verify(MethodCall[] calls) { producerCalls.Verify(calls); }
public virtual void Verify(MethodCall[] expectedCalls) { _recorder.Verify(expectedCalls); }
public void Verify(params MethodCall[] expectedCalls) { _recorder.Verify(expectedCalls); }