Package com.volantis.testtools.mock

Examples of com.volantis.testtools.mock.CompositeExpectation


        MockTestHelper.addExpectations(this);
    }

    // Javadoc inherited.
    public void beginSet() {
        CompositeExpectation expectation;
        if (current instanceof ExpectationSet) {
            expectation = current;
        } else {
            expectation = new ExpectationSet("Nested Inside: " + this);
        }
View Full Code Here


        pop();
    }

    // Javadoc inherited.
    public void beginSequence() {
        CompositeExpectation expectation;
        if (current instanceof ExpectationSequence) {
            expectation = current;
        } else {
            expectation = new ExpectationSequence("Nested Inside: " + this);
        }
View Full Code Here

     *
     * <p>If the popped expectation is the same as the current one then it has
     * already been added to it.</p>
     */
    private void pop() {
        CompositeExpectation expectation = current;
        current = (CompositeExpectation) expectationStack.remove(
                expectationStack.size() - 1);
        if (null != current && expectation != current) {
            current.addExpectation(expectation);
        }
View Full Code Here

    protected Expectation createExpectation() {
        return createCompositeExpectation();
    }

    public void testImmutable() {
        CompositeExpectation expectation = createCompositeExpectation();
        expectation.addExpectation(new TestSimpleExpectation("A"));

        ((InternalExpectation) expectation).makeImmutable();

        try {
            expectation.addExpectation(new TestSimpleExpectation("B"));

            fail("Did not detect attempt to change immutable expectation");
        } catch (IllegalStateException e) {
        }
    }
View Full Code Here

TOP

Related Classes of com.volantis.testtools.mock.CompositeExpectation

Copyright © 2018 www.massapicom. 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.