Package com.volantis.mcs.context

Examples of com.volantis.mcs.context.EnvironmentContextMock


        final String contextPathString = "/context/";
        final FormDescriptor fd = new FormDescriptor();

        MarinerPageContextMock pageContext =
                new MarinerPageContextMock("pageContext", expectations);
        EnvironmentContextMock envContext =
                new EnvironmentContextMock("envContext", expectations);
        MarinerURL contextPathURL = new MarinerURL(contextPathString);
        protocol.setMarinerPageContext(pageContext);
        MarinerURL requestURL = new MarinerURL(requestPath);
        FormDataManagerMock fdm = new FormDataManagerMock("fdm", expectations);
        SessionFormDataMock formData = new SessionFormDataMock(
View Full Code Here


    }

    private void addEnvironmentContext(
            final MarinerRequestContext marinerRequestContext) {
        // set the environment context
        final EnvironmentContextMock environmentContextMock =
            new EnvironmentContextMock("environmentContextMock", expectations);
        cachingDirectives =
            new ResponseCachingDirectives(SystemClock.getDefaultInstance());
        cachingDirectives.enable();
        assertTrue(cachingDirectives.isEnabled());
        environmentContextMock.expects.getCachingDirectives().returns(
View Full Code Here

       
        // Create basic mocks
        marinerPageContextMock =  new MarinerPageContextMock("marinerPageContextMock", expectations);
        requestContextMock =  new MarinerRequestContextMock("requestContextMock", expectations);
        volantisMock = new VolantisMock("volantisMock", expectations);
        environmentContextMock = new EnvironmentContextMock("environmentContextMock", expectations);
       
        // Interconnect mocks
        marinerPageContextMock
            .expects.getRequestContext()
            .returns(requestContextMock).any();
View Full Code Here

        prefixTracker.startPrefixMapping("meta-property",
            XDIMESchemata.XDIME2_MCS_NAMESPACE);
        final ExpressionContext expressionContext =
            expressionFactory.createExpressionContext(null, prefixTracker);

        final EnvironmentContextMock environmentContextMock =
            new EnvironmentContextMock("environmentContextMock", expectations);
        environmentContextMock.expects.getExpressionContext()
                .returns(expressionContext).any();
        requestContextMock.expects.getEnvironmentContext()
                .returns(environmentContextMock);
        pageContextMock.fuzzy.getElementMetaData(mockFactory.expectsAny()).does(
View Full Code Here

    protected void setSimpleSingleExpectations() {
       
        //super.setSimpleSingleExpectations();
        protocolConfig.expects.supportsEvents().returns(true);

        EnvironmentContextMock environmentContextMock = new EnvironmentContextMock("environmentContextMock", expectations);
        FormDataManagerMock fdm = new FormDataManagerMock("fdm", expectations);
        FormDescriptor fdesc = new FormDescriptor();
        SessionFormDataMock sessionFormData = new SessionFormDataMock(
                "formData", expectations, "s0", fdesc);
View Full Code Here

    protected void setSimpleMultipleExpectations() {
       
        //super.setSimpleMultipleExpectations();
        protocolConfig.expects.supportsEvents().returns(true).any();

        EnvironmentContextMock environmentContextMock = new EnvironmentContextMock("environmentContextMock", expectations);
        FormDataManagerMock fdm = new FormDataManagerMock("fdm", expectations);
        FormDescriptor fdesc = new FormDescriptor();
        SessionFormDataMock sessionFormData = new SessionFormDataMock(
                "formData", expectations, "s0", fdesc);
View Full Code Here

        final MarinerRequestContextMock requestContext =
            new MarinerRequestContextMock("requestContext", expectations);
        contextMock.expects.getCurrentElement().returns(null);
        contextMock.expects.getInitialRequestContext().returns(requestContext);
       
        final EnvironmentContextMock environmentContextMock =
            new EnvironmentContextMock("environmentContextMock", expectations);
        environmentContextMock.expects.getCachingDirectives().returns(null).
            any();
        requestContext.expects.getEnvironmentContext().returns(
            environmentContextMock).any();
View Full Code Here

        super.setUp();

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

        environmentContextMock = new EnvironmentContextMock(
                "environmentContextMock", expectations);

        requestContextMock.expects.getEnvironmentContext()
                .returns(environmentContextMock).any();
View Full Code Here

        cfg = new StyleSheetConfiguration();
        cfg.setCssSessionType("include-id-in-url");
        contextPathURL = new MarinerURL("/mariner/url");

        final EnvironmentContextMock environmentContextMock =
            new EnvironmentContextMock("environmentContextMock", expectations);

        cachingDirectives = new ResponseCachingDirectives(SystemClock.getDefaultInstance());
        cachingDirectives.enable();
        assertTrue(cachingDirectives.isEnabled());
View Full Code Here

     */   
    protected DOMProtocol buildExpectations(DOMProtocol protocol) {

         MarinerPageContextMock pageCtxMock = new MarinerPageContextMock(
                "pageCtx", expectations);       
        EnvironmentContextMock envCtxMock = new EnvironmentContextMock(
                "envCtx", expectations);
        VolantisMock volantisMock = new VolantisMock(
                "volantis", expectations);
        ProjectManagerMock projMgrMock = new ProjectManagerMock(
                "projMgr", expectations);
View Full Code Here

TOP

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

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.