Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.ApplicationGlobals


        i.setParser(parser);

        expect(parser.parseApplicationSpecification(r)).andReturn(as);

        ApplicationGlobals ag = new ApplicationGlobalsImpl();

        i.setGlobals(ag);

        replay();
View Full Code Here


        expect(config.getServletName()).andReturn("wilma");

        expect(config.getServletContext()).andReturn(context);

        ApplicationGlobals ag = new ApplicationGlobalsImpl();

        i.setGlobals(ag);

        replay();

        servlet.init(config);

        // The real ApplicationServlet will build a Registry and, indirectly, invoke this.

        i.initialize(servlet);

        verify();

        IApplicationSpecification as = ag.getSpecification();

        assertEquals("wilma", as.getName());
        assertEquals(new ContextResource(context, "/WEB-INF/wilma.application"), as
                .getSpecificationLocation());
    }
View Full Code Here

                "tapestry.init.ApplicationSpecificationInitializer",
                ApplicationInitializer.class);

        ai.initialize(servlet);

        ApplicationGlobals ag = (ApplicationGlobals) registry.getService(
                "tapestry.globals.ApplicationGlobals",
                ApplicationGlobals.class);

        assertEquals("ParseApp", ag.getSpecification().getName());

        verify();
       
        registry.shutdown();
    }
View Full Code Here

        servlet.getServletContext();
        setReturnValue(servlet,servletContext);

        replayControls();

        ApplicationGlobals globals = new ApplicationGlobalsImpl();

        WebContextInitializer initializer = new WebContextInitializer();

        initializer.setGlobals(globals);

        initializer.initialize(servlet);

        verifyControls();

        assertSame(servletContext, globals.getServletContext());
        assertNotNull(globals.getWebContext());
    }
View Full Code Here

        _localizationSetter = _registry.getService("LocalizationSetter", LocalizationSetter.class);

        _invocationMap = _registry.getObject(ComponentInvocationMap.class, null);

        ApplicationGlobals globals = _registry.getObject(ApplicationGlobals.class, null);

        globals.storeContext(new PageTesterContext(contextPath));

        Map<Class, ComponentInvoker> map = newMap();
        map.put(PageLinkTarget.class, new PageLinkInvoker(_registry));
        map.put(ActionLinkTarget.class, new ActionLinkInvoker(_registry, this, _invocationMap));
View Full Code Here

        _localizationSetter = _registry.getService("LocalizationSetter", LocalizationSetter.class);

        _invocationMap = _registry.getObject(ComponentInvocationMap.class, null);

        ApplicationGlobals globals = _registry.getObject(ApplicationGlobals.class, null);

        globals.store(new PageTesterContext(_contextPath));

        Map<Class, ComponentInvoker> map = newMap();
        map.put(PageLinkTarget.class, new PageLinkInvoker(_registry));
        map.put(ActionLinkTarget.class, new ActionLinkInvoker(_registry, this, _invocationMap));
View Full Code Here

        i.setParser(parser);

        parser.parseApplicationSpecification(appSpecResource);
        parserControl.setReturnValue(as);

        ApplicationGlobals ag = new ApplicationGlobalsImpl();

        i.setGlobals(ag);

        replayControls();

        servlet.init(config);

        // The real ApplicationServlet will build a Registry and, indirectly, invoke this.

        i.initialize(servlet);

        assertNotNull(ag.getActivator());
        assertSame(as, ag.getSpecification());

        verifyControls();
    }
View Full Code Here

        i.setParser(parser);

        parser.parseApplicationSpecification(r);
        parserControl.setReturnValue(as);

        ApplicationGlobals ag = new ApplicationGlobalsImpl();

        i.setGlobals(ag);

        replayControls();
View Full Code Here

        i.setParser(parser);

        parser.parseApplicationSpecification(r);
        parserControl.setReturnValue(as);

        ApplicationGlobals ag = new ApplicationGlobalsImpl();

        i.setGlobals(ag);

        replayControls();
View Full Code Here

        configControl.setReturnValue("wilma");

        config.getServletContext();
        configControl.setReturnValue(context);

        ApplicationGlobals ag = new ApplicationGlobalsImpl();

        i.setGlobals(ag);

        replayControls();

        servlet.init(config);

        // The real ApplicationServlet will build a Registry and, indirectly, invoke this.

        i.initialize(servlet);

        verifyControls();

        IApplicationSpecification as = ag.getSpecification();

        assertEquals("wilma", as.getName());
        assertEquals(new ContextResource(context, "/WEB-INF/wilma.application"), as
                .getSpecificationLocation());
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.ApplicationGlobals

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.