Package com.volantis.mcs.context

Examples of com.volantis.mcs.context.MarinerPageContextMock


        super.setUp();

        requestContextMock = new MarinerRequestContextMock(
                "requestContext", expectations);

        pageContextMock = new MarinerPageContextMock("pageContext", expectations);

        requestContextMock.expects.getMarinerPageContext().
                returns(pageContextMock).any();
    }
View Full Code Here


                mockFactory.expectsInstanceOf(VolantisProtocol.class),
                mockFactory.expectsInstanceOf(XFSelectAttributes.class)).returns().min(0).max(1);

        marinerRequestContextMock = new MarinerRequestContextMock(
                "marinerRequestContextMock", expectations);
        final MarinerPageContextMock marinerPageContextMock =
            new MarinerPageContextMock("marinerPageContextMock", expectations);

        marinerRequestContextMock.expects.getMarinerPageContext()
                .returns(marinerPageContextMock).any();
        final EnvironmentContextMock environmentContextMock =
            new EnvironmentContextMock("environmentContextMock", expectations);
View Full Code Here

        XFItemElementImplMock item =
                new XFItemElementImplMock("item", expectations, contextMock);

        XFormBuilderMock builder = new XFormBuilderMock("builder", expectations);
        XFormModelMock model = new XFormModelMock("model", expectations);
        MarinerPageContextMock pageContext =
                new MarinerPageContextMock("pageContext", expectations);
        PolicyReferenceResolverMock policyRefResolver =
                new PolicyReferenceResolverMock("policyRefResolver", expectations);
        SelectOptionMock attributes =
                new SelectOptionMock("attributes", expectations);
        TextAssetReference textAssetRef = new LiteralTextAssetReference("");
View Full Code Here

        XFormsControlElementMock control = new XFormsControlElementMock(
                "control", expectations, ELEMENT_TYPE, contextMock);

        XFormBuilderMock builder = new XFormBuilderMock("builder", expectations);
        XFormModelMock model = new XFormModelMock("model", expectations);
        MarinerPageContextMock pageContext =
                new MarinerPageContextMock("pageContext", expectations);
        PolicyReferenceResolverMock policyRefResolver =
                new PolicyReferenceResolverMock("policyRefResolver", expectations);
        XFFormFieldAttributesMock attributes =
                new XFFormFieldAttributesMock("attributes", expectations);
        TextAssetReference textAssetRef = new LiteralTextAssetReference("");
View Full Code Here

        model = new XFormModelMock("model", ordered);

        styles = new StylesMock("styles", ordered);
        requestContext =
                new MarinerRequestContextMock("requestContext", ordered);
        pageContext = new MarinerPageContextMock("pageContext", ordered);
        stylingEngine = new StylingEngineMock("stylingEngine", ordered);
        outputState = new ElementOutputStateMock("outputState", ordered);
    }
View Full Code Here

        values.expects.getSpecifiedValue(
                StylePropertyDetails.MCS_BREAK_AFTER).returns(value).fixed(count);
    }

    public void testUpdateFormFragmentationStateOnFirstFragment() {
        MarinerPageContextMock pageContext = new MarinerPageContextMock(
                "pageContext", expectations);
        pageContext.expects.updateFormFragmentationState(model.getID()).returns(null);
        assertEquals(-1, model.getRequestedFragmentIndex());
        model.updateFormFragmentationState(pageContext);
        assertEquals(0, model.getRequestedFragmentIndex());
View Full Code Here

        model.updateFormFragmentationState(pageContext);
        assertEquals(0, model.getRequestedFragmentIndex());
    }

    public void testUpdateFormFragmentationStateOnSubsequentFragments() {
        MarinerPageContextMock pageContext = new MarinerPageContextMock(
                "pageContext", expectations);
        pageContext.expects.updateFormFragmentationState(model.getID()).returns("ff1");
        assertEquals(-1, model.getRequestedFragmentIndex());
        model.updateFormFragmentationState(pageContext);
        assertEquals(1, model.getRequestedFragmentIndex());
View Full Code Here

        model.updateFormFragmentationState(pageContext);
        assertEquals(1, model.getRequestedFragmentIndex());
    }

    public void testUpdateFormFragmentationStateWhenKnowReqFragIndex() {
        MarinerPageContextMock pageContext = new MarinerPageContextMock(
                "pageContext", expectations);
        pageContext.expects.updateFormFragmentationState(model.getID()).returns(null);
        assertEquals(-1, model.getRequestedFragmentIndex());
        model.updateFormFragmentationState(pageContext);
        assertEquals(0, model.getRequestedFragmentIndex());
View Full Code Here

        model.updateFormFragmentationState(pageContext);
        assertEquals(0, model.getRequestedFragmentIndex());
    }

    public void testPushFirstGroup() {
        MarinerPageContextMock pageContext = new MarinerPageContextMock(
                "pageContext", expectations);
        DeviceLayoutContextMock dlc =
                    new DeviceLayoutContextMock("dlc", expectations);
        StylesMock styles = new StylesMock("styles", expectations);
View Full Code Here

        assertNotNull(currentFormFragment);
        assertEquals(1, model.getNestingDepth());
    }

    public void testPushSecondOuterGroup() {
        MarinerPageContextMock pageContext = new MarinerPageContextMock(
                "pageContext", expectations);
        DeviceLayoutContextMock dlc =
                    new DeviceLayoutContextMock("dlc", expectations);
        StylesMock styles = new StylesMock("styles", expectations);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.context.MarinerPageContextMock

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.