Package org.apache.tiles.request

Examples of org.apache.tiles.request.ApplicationContext


     * @throws IllegalAccessException If something goes wrong.
     * @throws IllegalArgumentException If something goes wrong.
     */
    @Test
    public void testEventPortletRequest() throws NoSuchFieldException, IllegalAccessException {
        ApplicationContext applicationContext = createMock(ApplicationContext.class);
        PortletContext portletContext = createMock(PortletContext.class);
        EventRequest request = createMock(EventRequest.class);
        EventResponse response = createMock(EventResponse.class);

        replay(applicationContext, portletContext, request, response);
View Full Code Here


     * @throws IllegalArgumentException If something goes wrong.
     */
    @Test
    public void testActionPortletRequest() throws NoSuchFieldException,
            IllegalAccessException    {
        ApplicationContext applicationContext = createMock(ApplicationContext.class);
        PortletContext portletContext = createMock(PortletContext.class);
        ActionRequest request = createMock(ActionRequest.class);
        ActionResponse response = createMock(ActionResponse.class);

        replay(applicationContext, portletContext, request, response);
View Full Code Here

     * @throws IllegalAccessException If something goes wrong.
     * @throws IllegalArgumentException If something goes wrong.
     */
    @Test
    public void testRenderPortletRequest() throws NoSuchFieldException, IllegalAccessException {
        ApplicationContext applicationContext = createMock(ApplicationContext.class);
        PortletContext portletContext = createMock(PortletContext.class);
        RenderRequest request = createMock(RenderRequest.class);
        RenderResponse response = createMock(RenderResponse.class);

        replay(applicationContext, portletContext, request, response);
View Full Code Here

    @Test
    public void testGetApplicationContext() throws TemplateModelException {
        GenericServlet servlet = createMock(GenericServlet.class);
        ServletContext servletContext = createMock(ServletContext.class);
        ObjectWrapper objectWrapper = createMock(ObjectWrapper.class);
        ApplicationContext applicationContext = createMock(ApplicationContext.class);

        expect(servlet.getServletContext()).andReturn(servletContext).times(2);
        expect(servletContext.getAttribute(ApplicationAccess
                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext);
View Full Code Here

     * Test method for {@link ServletUtil#getApplicationContext(ServletContext)}.
     */
    @Test
    public void testGetApplicationContext() {
        ServletContext servletContext = createMock(ServletContext.class);
        ApplicationContext applicationContext = createMock(ApplicationContext.class);

        expect(servletContext.getAttribute(ApplicationAccess
                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext);

        replay(servletContext, applicationContext);
View Full Code Here

        TemplateHashModel model = createMock(TemplateHashModel.class);
        PrintWriter writer = new PrintWriter(new StringWriter());
        HttpServletRequest httpRequest = createMock(HttpServletRequest.class);
        HttpServletResponse httpResponse = createMock(HttpServletResponse.class);
        ObjectWrapper objectWrapper = createMock(ObjectWrapper.class);
        ApplicationContext applicationContext = createMock(ApplicationContext.class);

        expect(template.getMacros()).andReturn(new HashMap<Object, Object>());

        replay(httpRequest, httpResponse, objectWrapper);
        HttpRequestHashModel requestHashModel = new HttpRequestHashModel(httpRequest, httpResponse, objectWrapper);
View Full Code Here

     */
    @Test
    public void testDispatch() throws IOException {
        String path = "this way";
        DispatchRequest enclosedRequest = createMock(DispatchRequest.class);
        ApplicationContext applicationContext = createMock(ApplicationContext.class);
        Map<String, Object> requestScope = new HashMap<String, Object>();

        enclosedRequest.include(path);
        expect(enclosedRequest.getAvailableScopes()).andReturn(Collections.singletonList("parent"));
        expect(enclosedRequest.getContext(Request.REQUEST_SCOPE)).andReturn(requestScope);
View Full Code Here

     * Sets up the test.
     */
    @Before
    public void setUp() {
        rendererFactory = new BasicRendererFactory();
        ApplicationContext applicationContext = createMock(ApplicationContext.class);
        replay(applicationContext);
    }
View Full Code Here

    public void testInitAndGetRenderer() {
        Renderer renderer1 = createMock(Renderer.class);
        Renderer renderer2 = createMock(Renderer.class);
        Renderer renderer3 = createMock(Renderer.class);
        Renderer renderer4 = createMock(Renderer.class);
        ApplicationContext applicationContext = createMock(ApplicationContext.class);

        replay(renderer1, renderer2, renderer3, renderer4, applicationContext);
        rendererFactory.registerRenderer("string", renderer1);
        rendererFactory.registerRenderer("test", renderer2);
        rendererFactory.registerRenderer("test2", renderer3);
View Full Code Here

    public void testGetRendererException() {
        Renderer renderer1 = createMock(Renderer.class);
        Renderer renderer2 = createMock(Renderer.class);
        Renderer renderer3 = createMock(Renderer.class);
        Renderer renderer4 = createMock(Renderer.class);
        ApplicationContext applicationContext = createMock(ApplicationContext.class);

        replay(renderer1, renderer2, renderer3, renderer4, applicationContext);
        rendererFactory.registerRenderer("string", renderer1);
        rendererFactory.registerRenderer("test", renderer2);
        rendererFactory.registerRenderer("test2", renderer3);
View Full Code Here

TOP

Related Classes of org.apache.tiles.request.ApplicationContext

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.