Examples of InternalContextAdapter


Examples of org.apache.flex.forks.velocity.context.InternalContextAdapter

                    /*
                     *  init.  be a good citizen and give it an ICA
                     */

                    InternalContextAdapter ica
                            = new InternalContextAdapterImpl(new VelocityContext());

                    ica.pushCurrentTemplateName("VMProxyArg : "
                            + ParserTreeConstants.jjtNodeName[type]);

                    nodeTree.init(ica, rsvc);
                }
                catch ( Exception e )
View Full Code Here

Examples of org.apache.velocity.context.InternalContextAdapter

     * Test method for {@link org.apache.tiles.request.velocity.autotag.VelocityModelBody#evaluate(java.io.Writer)}.
     * @throws IOException If something goes wrong.
     */
    @Test
    public void testEvaluateWriter() throws IOException {
        InternalContextAdapter internalContextAdapter = createMock(InternalContextAdapter.class);
        ASTBlock body = createMock(ASTBlock.class);
        Writer writer = createMock(Writer.class);
        expect(body.render(internalContextAdapter, writer)).andReturn(true);

        replay(internalContextAdapter, body, writer);
View Full Code Here

Examples of org.apache.velocity.context.InternalContextAdapter

    /**
     * Test method for {@link VelocityUtil#getParameters(InternalContextAdapter, Node)}.
     */
    @Test
    public void testGetParameters() {
        InternalContextAdapter context = createMock(InternalContextAdapter.class);
        Node node = createMock(Node.class);
        ASTMap astMap = createMock(ASTMap.class);
        @SuppressWarnings("unchecked")
        Map<String, Object> params = createMock(Map.class);

View Full Code Here

Examples of org.apache.velocity.context.InternalContextAdapter

import org.junit.Test;

public class VelocityAutotagRuntimeTest {
    @Test
    public void testCreateRequest() {
        InternalContextAdapter context = createMock(InternalContextAdapter.class);
        Writer writer = createMock(Writer.class);
        Node node = createMock(Node.class);
        ViewToolContext viewContext = createMock(ViewToolContext.class);
        HttpServletRequest request = createMock(HttpServletRequest.class);
        HttpServletResponse response = createMock(HttpServletResponse.class);
        ServletContext servletContext = createMock(ServletContext.class);
        ApplicationContext applicationContext = createMock(ApplicationContext.class);

        expect(context.getInternalUserContext()).andReturn(viewContext);
        expect(viewContext.getRequest()).andReturn(request);
        expect(viewContext.getResponse()).andReturn(response);
        expect(viewContext.getServletContext()).andReturn(servletContext);
        expect(servletContext.getAttribute(ApplicationAccess.APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext);
View Full Code Here

Examples of org.apache.velocity.context.InternalContextAdapter

        verify(context, writer, node, viewContext, request, response, servletContext, applicationContext);
    }

    @Test
    public void testCreateModelBody() {
        InternalContextAdapter context = createMock(InternalContextAdapter.class);
        Writer writer = createMock(Writer.class);
        Node node = createMock(Node.class);
        ASTBlock block = createMock(ASTBlock.class);
        expect(node.jjtGetChild(1)).andReturn(block);
        replay(context, writer, node, block);
View Full Code Here

Examples of org.apache.velocity.context.InternalContextAdapter

        verify(context, writer, node, block);
    }

    @Test
    public void testGetParameter() {
        InternalContextAdapter context = createMock(InternalContextAdapter.class);
        Writer writer = createMock(Writer.class);
        Node node = createMock(Node.class);
        ASTMap astMap = createMock(ASTMap.class);
        @SuppressWarnings("unchecked")
        Map<String, Object> params = createMock(Map.class);
View Full Code Here

Examples of org.apache.velocity.context.InternalContextAdapter

     * Test method for {@link org.apache.tiles.request.velocity.autotag.VelocityModelBody#evaluate(java.io.Writer)}.
     * @throws IOException If something goes wrong.
     */
    @Test
    public void testEvaluateWriter() throws IOException {
        InternalContextAdapter internalContextAdapter = createMock(InternalContextAdapter.class);
        ASTBlock body = createMock(ASTBlock.class);
        Writer writer = createMock(Writer.class);
        expect(body.render(internalContextAdapter, writer)).andReturn(true);

        replay(internalContextAdapter, body, writer);
View Full Code Here

Examples of org.apache.velocity.context.InternalContextAdapter

    /**
     * Test method for {@link VelocityUtil#getParameters(InternalContextAdapter, Node)}.
     */
    @Test
    public void testGetParameters() {
        InternalContextAdapter context = createMock(InternalContextAdapter.class);
        Node node = createMock(Node.class);
        ASTMap astMap = createMock(ASTMap.class);
        @SuppressWarnings("unchecked")
        Map<String, Object> params = createMock(Map.class);

View Full Code Here

Examples of org.apache.velocity.context.InternalContextAdapter

                    /*
                     *  init.  be a good citizen and give it an ICA
                     */

                    InternalContextAdapter ica
                            = new InternalContextAdapterImpl(new VelocityContext());

                    ica.pushCurrentTemplateName("VMProxyArg : "
                            + ParserTreeConstants.jjtNodeName[type]);

                    nodeTree.init(ica, rsvc);
                }
                /**
 
View Full Code Here

Examples of org.apache.velocity.context.InternalContextAdapter

                    /*
                     *  init.  be a good citizen and give it an ICA
                     */

                    InternalContextAdapter ica
                            = new InternalContextAdapterImpl(new VelocityContext());

                    ica.pushCurrentTemplateName("VMProxyArg : "
                            + ParserTreeConstants.jjtNodeName[type]);

                    nodeTree.init(ica, rsvc);
                }
                catch ( Exception e )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.