Package org.apache.tiles.context

Examples of org.apache.tiles.context.TilesRequestContextFactory


     * .
     */
    @Test
    public void testCreateDefinitionsReader() {
        TilesApplicationContext applicationContext = createMock(TilesApplicationContext.class);
        TilesRequestContextFactory contextFactory = createMock(TilesRequestContextFactory.class);

        replay(applicationContext, contextFactory);
        assertTrue(factory.createDefinitionsReader(applicationContext,
                contextFactory) instanceof CompatibilityDigesterDefinitionsReader);
        verify(applicationContext, contextFactory);
View Full Code Here


        HttpServletResponse httpResponse = EasyMock
                .createMock(HttpServletResponse.class);
        EasyMock.expect(pageContext.getRequest()).andReturn(httpRequest);
        EasyMock.expect(pageContext.getResponse()).andReturn(httpResponse);

        TilesRequestContextFactory parent = EasyMock
                .createMock(TilesRequestContextFactory.class);
        TilesRequestContext enclosedRequest = EasyMock
                .createMock(TilesRequestContext.class);
        EasyMock.expect(parent.createRequestContext(context, httpRequest,
                httpResponse)).andReturn(enclosedRequest);
        factory.setRequestContextFactory(parent);

        EasyMock.replay(context, pageContext, httpRequest, httpResponse, parent);
        JspTilesRequestContext request = (JspTilesRequestContext) factory
View Full Code Here

    @SuppressWarnings("deprecation")
    @Test
    public void testRegisterAttributeRenderers() {
        BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
        ServletTilesApplicationContext applicationContext = createMock(ServletTilesApplicationContext.class);
        TilesRequestContextFactory contextFactory = createMock(TilesRequestContextFactory.class);
        TilesContainer container = createMock(TilesContainer.class);
        AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
        ServletContext servletContext = createMock(ServletContext.class);

        rendererFactory.registerRenderer(eq("string"),
View Full Code Here

     */
    @Test
    public void testCreateDefaultAttributeRenderer() {
        TilesApplicationContext applicationContext = createMock(TilesApplicationContext.class);
        TilesContainer container = createMock(TilesContainer.class);
        TilesRequestContextFactory requestContextFactory = createMock(TilesRequestContextFactory.class);
        AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
        BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
        AttributeRenderer stringRenderer = createMock(TypeDetectingAttributeRenderer.class);
        AttributeRenderer templateRenderer = createMock(TypeDetectingAttributeRenderer.class);
        AttributeRenderer definitionRenderer = createMock(TypeDetectingAttributeRenderer.class);
View Full Code Here

     * .
     */
    @Test
    public void testCreateAttributeEvaluatorFactory() {
        TilesApplicationContext applicationContext = createMock(TilesApplicationContext.class);
        TilesRequestContextFactory contextFactory = createMock(TilesRequestContextFactory.class);
        LocaleResolver resolver = createMock(LocaleResolver.class);
        ServletContext servletContext = createMock(ServletContext.class);
        JspFactory jspFactory = createMock(JspFactory.class);
        JspApplicationContext jspApplicationContext = createMock(JspApplicationContext.class);
        ExpressionFactory expressionFactory = createMock(ExpressionFactory.class);
View Full Code Here

     * @throws IOException If something goes wrong.
     */
    @Test
    public void testGetSourceURLs() throws IOException {
        TilesApplicationContext applicationContext = createMock(TilesApplicationContext.class);
        TilesRequestContextFactory contextFactory = createMock(TilesRequestContextFactory.class);

        URL url1 = new URL("file:///nonexistent/tiles.xml");
        URL url2 = new URL("file:///nonexistent/tiles_it.xml");
        URL url3 = new URL("file:///nonexistent2/tiles.xml");

View Full Code Here

     * @throws IOException If something goes wrong.
     */
    @Test
    public void testTILES484first() throws IOException {
        TilesApplicationContext applicationContext = createMock(TilesApplicationContext.class);
        TilesRequestContextFactory contextFactory = createMock(TilesRequestContextFactory.class);

        URL url3 = new URL("file:///nonexistent2/tiles.xml");

        Set<URL> urls2 = new HashSet<URL>();
        urls2.add(url3);
View Full Code Here

     * @throws IOException If something goes wrong.
     */
    @Test
    public void testTILES484second() throws IOException {
        TilesApplicationContext applicationContext = createMock(TilesApplicationContext.class);
        TilesRequestContextFactory contextFactory = createMock(TilesRequestContextFactory.class);

        URL url1 = new URL("file:///nonexistent/tiles.xml");
        URL url2 = new URL("file:///nonexistent/tiles_it.xml");

        Set<URL> urls1 = new HashSet<URL>();
View Full Code Here

     * .
     */
    @Test
    public void testCreateDefinitionsReader() {
        TilesApplicationContext applicationContext = createMock(TilesApplicationContext.class);
        TilesRequestContextFactory contextFactory = createMock(TilesRequestContextFactory.class);

        replay(applicationContext, contextFactory);
        assertTrue(factory.createDefinitionsReader(applicationContext,
                contextFactory) instanceof CompatibilityDigesterDefinitionsReader);
        verify(applicationContext, contextFactory);
View Full Code Here

                AbstractTilesApplicationContextFactory.APPLICATION_CONTEXT_FACTORY_INIT_PARAM);
        if (contextFactory instanceof Initializable) {
            ((Initializable) contextFactory).init(configuration);
        }

        TilesRequestContextFactory requestContextFactory =
            (TilesRequestContextFactory) createFactory(configuration,
                REQUEST_CONTEXT_FACTORY_INIT_PARAM);
        requestContextFactory.init(configuration);

        RendererFactory rendererFactory =
            (RendererFactory) createFactory(configuration,
                RENDERER_FACTORY_INIT_PARAM);
View Full Code Here

TOP

Related Classes of org.apache.tiles.context.TilesRequestContextFactory

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.