Examples of VoidStub


Examples of org.jmock.stub.VoidStub

    }

    public void testDelegatesVerifyToInvocationMatchers() throws Throwable {
        MockInvocationMatcher mockInvocationMatcher = new MockInvocationMatcher();

        InvocationMocker mocker = new InvocationMocker(new InvocationMatcher[]{mockInvocationMatcher}, new VoidStub());
        mockInvocationMatcher.verifyCalls.setExpected(1);

        mocker.verify();

        Verifier.verifyObject(mockInvocationMatcher);
View Full Code Here

Examples of org.jmock.stub.VoidStub

    }

    public void testCanAddExtraMatchers() throws Throwable {
        MockInvocationMatcher mockInvocationMatcher = new MockInvocationMatcher();

        InvocationMocker mocker = new InvocationMocker(new InvocationMatcher[0], new VoidStub());
        mockInvocationMatcher.match.setExpected(exampleInvocation);
        mockInvocationMatcher.invocation.setExpected(exampleInvocation);

        mocker.addMatcher(mockInvocationMatcher);
        mocker.matches(exampleInvocation);
View Full Code Here

Examples of org.jmock.stub.VoidStub

import org.jmock.stub.VoidStub;

public class InvocationMockerBuilderTest extends TestCase {
    public class MockInvocationMocker extends InvocationMocker {
        public MockInvocationMocker() {
            super(new InvocationMatcher[0], new VoidStub());
        }
View Full Code Here

Examples of org.jmock.stub.VoidStub

    public InvocationMockerBuilder(InvocationMocker mocker) {
        this.mocker = mocker;
    }

    public ExpectationBuilder isVoid() {
        mocker.setStub(new VoidStub());
        return this;
    }
View Full Code Here

Examples of org.jmock.stub.VoidStub

    public void verify() {
        coreMock.verify();
    }

    public StubBuilder method(String methodName, Object arg1, Object arg2) {
        InvocationMocker mocker = new InvocationMocker(methodName, C.eq(arg1, arg2), new VoidStub());
        coreMock.add(mocker);
        return new InvocationMockerBuilder(mocker);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.