Package com.volantis.testtools.mock

Examples of com.volantis.testtools.mock.TestEvent


        list.add(new TestEvent("C"));
        return list;
    }

    public void testCompleteSequence() {
        sequence.checkExpectations(ExpectationState.CURRENT, new TestEvent("A"), report);
        sequence.checkExpectations(ExpectationState.CURRENT, new TestEvent("B"), report);
        sequence.checkExpectations(ExpectationState.CURRENT, new TestEvent("C"), report);

        sequence.verify();
    }
View Full Code Here


        sequence.verify();
    }

    public void testPartialSequence() {
        sequence.checkExpectations(ExpectationState.CURRENT, new TestEvent("A"), report);
        sequence.checkExpectations(ExpectationState.CURRENT, new TestEvent("B"), report);

        try {
            sequence.verify();
            fail("Unsatisfied expectations not detected");
        } catch (AssertionFailedError e) {
View Full Code Here

            // Worked
        }
    }

    public void testInvalidSequence() {
        sequence.checkExpectations(ExpectationState.CURRENT, new TestEvent("A"), report);

        try {
            sequence.checkExpectations(ExpectationState.CURRENT, new TestEvent("C"), report);
            fail("Mismatching event not detected");
        } catch (AssertionFailedError e) {
            // Worked
        }
    }
View Full Code Here

        return set;
    }

    protected List createSatisfyingEvents() {
        List list = new ArrayList();
        list.add(new TestEvent("A"));
        list.add(new TestEvent("B"));
        list.add(new TestEvent("C"));
        return list;
    }
View Full Code Here

        list.add(new TestEvent("C"));
        return list;
    }

    public void testCompleteSet() {
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("A"), report);
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("B"), report);
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("C"), report);

        set.verify();
    }
View Full Code Here

        set.verify();
    }

    public void testPartialSet() {
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("A"), report);
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("B"), report);

        try {
            set.verify();
            fail("Unsatisfied expectations not detected");
        } catch (AssertionFailedError e) {
View Full Code Here

            // Worked
        }
    }

    public void testDifferentOrderSet() {
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("B"), report);
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("A"), report);
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("C"), report);

        set.verify();
    }
View Full Code Here

        set.verify();
    }

    public void testInvalidSet() {
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("A"), report);

        try {
            set.checkExpectations(ExpectationState.CURRENT, new TestEvent("D"), report);
            fail("Mismatching event not detected");
        } catch (AssertionFailedError e) {
            // Worked
        }
    }
View Full Code Here

            // Worked
        }
    }

    public void testAssessInitialState() {
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("B"), report);
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("A"), report);
        set.checkExpectations(ExpectationState.CURRENT, new TestEvent("C"), report);

        EventEffect effect
                = set.checkExpectations(ExpectationState.INITIAL,
                                   new TestEvent("A"), report);
        assertSame("Unexpected event effect assessment",
                   EventEffect.MATCHED_EXPECTATION, effect);
    }
View Full Code Here

TOP

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

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.