Package com.volantis.mcs.runtime.policies

Examples of com.volantis.mcs.runtime.policies.PolicyReferenceResolverMock


        pageContext = context;
        pageContext.pushRequestContext(requestContext);
        pageContext.setProtocol(protocol);

        final PolicyReferenceResolverMock referenceResolverMock =
                new PolicyReferenceResolverMock("referenceResolverMock",
                        expectations);
        pageContext.setPolicyReferenceResolver(referenceResolverMock);

        referenceResolverMock.expects.resolveQuotedScriptExpression(null)
                .returns(null).any();
View Full Code Here


        FormInstance formInstance = new FormInstance(
                NDimensionalIndex.ZERO_DIMENSIONS);
        formInstance.setFormat(form);

        final PolicyReferenceResolverMock referenceResolverMock =
                new PolicyReferenceResolverMock("referenceResolverMock",
                        expectations);
        referenceResolverMock.expects.
                resolveQuotedTextExpression(fragmentName).returns(null);
        MarinerApplication application = new MarinerServletApplication();
        MarinerConfiguration config = new MarinerConfiguration();
View Full Code Here

        ContextInternals.setMarinerPageContext(requestContext, pageContext);
        requestContext.expects.getMarinerPageContext().returns(pageContext);
        pageContext.expects.getCurrentElement().returns(formElement);
        formElement.expects.getProtocolAttributes().returns(formAttributes).max(2);
        formElement.expects.getFormDescriptor().returns(fd).any();
        PolicyReferenceResolverMock policyResolver = PolicyReferenceResolverTestHelper.
                getCommonExpectations(expectations, mockFactory);
        pageContext.expects.getPolicyReferenceResolver().returns(policyResolver);
        fd.fuzzy.addField(mockFactory.expectsInstanceOf(FieldDescriptor.class));

        // Run the test.
View Full Code Here

        pageContext.setFormatInstance(paneInstance);
        pageContext.setDeviceLayout(runtimeDeviceLayout);
        pageContext.pushDeviceLayoutContext(deviceLayoutContext);
        pageContext.addPaneMapping(pane);

        final PolicyReferenceResolverMock referenceResolverMock =
                new PolicyReferenceResolverMock("referenceResolverMock",
                        expectations);

        pageContext.setPolicyReferenceResolver(referenceResolverMock);

        referenceResolverMock.expects.resolveQuotedTextExpression(null)
View Full Code Here

            // javadoc inherited
            public void execute(MarinerPageContext pageContext,
                                PAPIElement element) throws Exception {
                setUp(pageContext);

                PolicyReferenceResolverMock referenceResolverMock =
                        (PolicyReferenceResolverMock)
                        pageContext.getPolicyReferenceResolver();

                referenceResolverMock.expects
                        .resolveQuotedScriptExpression("onclick")
View Full Code Here

        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(layout);

        pageContext.setDeviceLayout(runtimeDeviceLayout);

        final PolicyReferenceResolverMock referenceResolverMock =
                new PolicyReferenceResolverMock("referenceResolverMock",
                        expectations);
        pageContext.setPolicyReferenceResolver(referenceResolverMock);

        // Link everything together
        ContextInternals.setMarinerPageContext(requestContext, pageContext);
View Full Code Here

        TestMarinerRequestContext requestContext =
                new TestMarinerRequestContext();
       
        pageContext.pushRequestContext(requestContext);

        referenceResolverMock = new PolicyReferenceResolverMock("referenceResolverMock",
                                expectations);

        pageContext.setPolicyReferenceResolver(referenceResolverMock);

        requestContext.setMarinerPageContext(pageContext);
View Full Code Here

    private PolicyReferenceResolverMock referenceResolverMock;

    public void setUp() throws Exception {
        super.setUp();

        referenceResolverMock = new PolicyReferenceResolverMock(
                "referenceResolverMock", expectations);
        pageContext.setPolicyReferenceResolver(referenceResolverMock);

        referenceResolverMock.expects.resolveQuotedTextExpression(null)
                .returns(null).any();
View Full Code Here

        deviceLayoutContext.setFormatInstance(testPane,
                NDimensionalIndex.ZERO_DIMENSIONS, paneInstance);
        pageContext.pushDeviceLayoutContext(deviceLayoutContext);
        pageContext.setFormatInstance(paneInstance);

        final PolicyReferenceResolverMock referenceResolverMock =
                new PolicyReferenceResolverMock("referenceResolverMock",
                        expectations);

        referenceResolverMock.expects.resolveQuotedTextExpression(null)
                .returns(null).any();
View Full Code Here

        pageContext.setProtocol(protocol);
        pageContext.setPageGenerationCache(new PageGenerationCache());
        pageContext.setRequestURL(
                new MarinerURL("http://server:8080/volantis/test.xdime"));

        final PolicyReferenceResolverMock referenceResolverMock =
                new PolicyReferenceResolverMock("referenceResolverMock",
                        expectations);
        pageContext.setPolicyReferenceResolver(referenceResolverMock);
        referenceResolverMock.expects
                .resolveQuotedLinkExpression(null, PageURLType.FORM)
                .returns(null).any();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.policies.PolicyReferenceResolverMock

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.