Examples of OrderedExpectations


Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(new OrderedExpectations() {
            public void add() {
                iterateeMock.expects.next(text1)
                        .returns(IterationAction.CONTINUE);
                iterateeMock.expects.next(text2)
                        .returns(IterationAction.CONTINUE);
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(new OrderedExpectations() {
            public void add() {
                iterateeMock.expects.next(text2)
                        .returns(IterationAction.CONTINUE);
                iterateeMock.expects.next(text3)
                        .returns(IterationAction.CONTINUE);
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        final int INT_IDENTIFIER = System.identityHashCode(paneMock);
        final String STRING_IDENTIFIER = String.valueOf(INT_IDENTIFIER);

        // NOTE: this tests Pane which is has different namespace and element
        // name rules to the other formats.
        expectations.add(new OrderedExpectations() {
            public void add() {

                stylingEngineMock.fuzzy
                        .startElement(XDIMESchemata.CDM_NAMESPACE, "pane",
                                      mockFactory.expectsInstanceOf(Attributes.class))
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // --------------------------------------------------------------------
        //   Write some content.
        // --------------------------------------------------------------------

        sharedExpectations.add(new OrderedExpectations() {
            public void add() {

                // Expect the arbitrator to be consulted and make it use the
                // separator.
                expectDecide(mockSeparatorArbitrator, separatorManager,
                             null, mockSeparatorRenderer1,
                             mockSeparatedContent1, null,
                             USE_DEFERRED_SEPARATOR);

                // Then expect the separator to be rendered.
                mockSeparatorRenderer1.expects.render(outputBuffer);
            }
        });

        separatorManager.beforeContent(mockSeparatedContent1);

        // --------------------------------------------------------------------
        //   Render a separator.
        // --------------------------------------------------------------------

        // No expectations.

        separatorManager.queueSeparator(mockSeparatorRenderer2);

        // --------------------------------------------------------------------
        //   Write some content.
        // --------------------------------------------------------------------

        sharedExpectations.add(new OrderedExpectations() {
            public void add() {

                // Expect the arbitrator to be consulted and make it use the
                // separator.
                expectDecide(mockSeparatorArbitrator, separatorManager,
                             mockSeparatedContent1, mockSeparatorRenderer2,
                             mockSeparatedContent2, null,
                             USE_DEFERRED_SEPARATOR);

                // Then expect the separator to be rendered.
                mockSeparatorRenderer2.expects.render(outputBuffer);
            }
        });

        separatorManager.beforeContent(mockSeparatedContent2);

        // --------------------------------------------------------------------
        //   Render a separator.
        // --------------------------------------------------------------------

        // No expectations.

        separatorManager.queueSeparator(mockSeparatorRenderer1);

        // --------------------------------------------------------------------
        //   Flush pending operations.
        // --------------------------------------------------------------------

        sharedExpectations.add(new OrderedExpectations() {
            public void add() {

                // Expect the arbitrator to be consulted and make it use the
                // separator.
                expectDecide(mockSeparatorArbitrator, separatorManager,
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // --------------------------------------------------------------------
        //   Flush pending operations.
        // --------------------------------------------------------------------

        sharedExpectations.add(new OrderedExpectations() {
            public void add() {

                // Expect the arbitrator to be consulted and make it use the separator.
                expectDecide(mockSeparatorArbitrator, separatorManager,
                             null, mockSeparatorRenderer1,
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(new OrderedExpectations() {
            public void add() {
                specificityCalculatorMock.expects.reset();

                specificityCalculatorMock.expects.getSpecificity()
                        .returns(specificityMock);
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(new OrderedExpectations() {
            public void add() {
                papiElementFactoryMock.expects.createGenericAttributes()
                        .returns(attributesMock);

                attributesMock.expects.reset();
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

                expectTypeSelectorWithDefaultNamespace("c", clocal, csequence);
            }
        };

        final Expectations bcComposite = new OrderedExpectations() {
            public void add() {

                add(bcParts);

                factoryMock.expects.createCompositeMatcher(bsequence, csequence,
                        Operator.DESCENDANT, matcherBuilderContextMock)
                        .returns(b_cMatcher);
            }
        };

        // The different parts of the "a > (b c)" selector can be created in
        // any order but that must be before the composite matcher is created.
        final Expectations a_bcParts = new UnorderedExpectations() {
            public void add() {

                add(bcComposite);

                expectTypeSelectorWithDefaultNamespace("a", alocal, asequence);
            }
        };

        final Expectations a_bcComposite = new OrderedExpectations() {
            public void add() {

                add(a_bcParts);

                factoryMock.expects.createCompositeMatcher(
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================
        expectations.add(
                new OrderedExpectations() {
                    public void add() {
                        addInitialiseExpectations(this);
                        addExecuteExpectations(0);
                    }
                });
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(
                new OrderedExpectations() {
                    public void add() {
                        addInitialiseExpectations(this);
                        addExecuteExpectations(0);
                        addUndoExpectations(1);
                    }
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.