Package com.volantis.testtools.mock

Examples of com.volantis.testtools.mock.EventEffect


            throw new IllegalArgumentException("Unknown expectation state " + state);
        }

        // Try all the remaining unsatisfied expectations until we find one
        // that will fail, or consume the event.
        EventEffect effect = EventEffect.WOULD_SATISFY;
        int size = expectations.size();

        for (int i = position; i < size && effect == EventEffect.WOULD_SATISFY; i += 1) {
            // Check to see if the next unsatisfied expectation can consume the
            // event.
View Full Code Here


        // Get the nested expectation.
        InternalExpectation expectation = getExpectation();

        // The effect that the event will have.
        EventEffect effect;

        // Assess the effect on the nested expectation.
        EventEffect nestedEffect = expectation.checkExpectations(
                state, event, report);

        if (nestedEffect == EventEffect.WOULD_FAIL) {
            SatisfactionLevel satisfactionLevel;
            if (state == ExpectationState.CURRENT
View Full Code Here

            SatisfactionLevel satisfactionLevel) {

        // Get the nested expectation.
        InternalExpectation expectation = getExpectation();

        EventEffect effect;

        // The expectation fails because it is completely satisfied,
        // and this is not being done in the initial state. As we know
        // that this expectation is not completely satisfied (otherwise
        // the code should not have reached here) we should see whether
        // we should start another iteration in the loop by checking
        // the effect of the event in the initial state.
        EventEffect initialEffect = expectation.checkExpectations(
                ExpectationState.INITIAL, event, report);

        if (initialEffect == EventEffect.WOULD_FAIL) {
            // The nested expectation would fail if it processed the event.
View Full Code Here

                    (InternalExpectation) expectations.get(i);
            if (expectation.isCompletelySatisfied(state)) {
                continue;
            }

            EventEffect effect = expectation.checkExpectations(state, event, report);
            if (effect == EventEffect.MATCHED_EXPECTATION) {

                // If this is in the initial state then reset the count of the
                // number of satisfied nested expectations.
                if (state == ExpectationState.INITIAL) {
View Full Code Here

            report.startExpectation();
            before(report);
            report.setMarker(this);
        }

        EventEffect effect = checkNestedExpectations(state, event, report);

        if (opaqueContainer) {
            report.setMarker(oldMarker);
            after(report);
            report.handleEventEffect(effect);
View Full Code Here

TOP

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

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.