Package org.springframework.mock.web.portlet

Examples of org.springframework.mock.web.portlet.MockEvent


    request.setSession(actionRequest.getPortletSession());
    response = new MockRenderResponse();
    portlet.render(request, response);
    assertEquals("XXX", response.getContentAsString());

    MockEventRequest eventRequest = new MockEventRequest(new MockEvent("event1"));
    MockEventResponse eventResponse = new MockEventResponse();
    portlet.processEvent(eventRequest, eventResponse);

    request = new MockRenderRequest(PortletMode.VIEW, WindowState.MAXIMIZED);
    request.setParameters(eventResponse.getRenderParameterMap());
    response = new MockRenderResponse();
    portlet.render(request, response);
    assertEquals("myLargeView-value3", response.getContentAsString());

    eventRequest = new MockEventRequest(new MockEvent("event2"));
    eventResponse = new MockEventResponse();
    portlet.processEvent(eventRequest, eventResponse);

    request = new MockRenderRequest(PortletMode.VIEW, WindowState.MAXIMIZED);
    request.setParameters(eventResponse.getRenderParameterMap());
View Full Code Here


    request.setSession(actionRequest.getPortletSession());
    response = new MockRenderResponse();
    portlet.render(request, response);
    assertEquals("myLargeView-details", response.getContentAsString());

    MockEventRequest eventRequest = new MockEventRequest(new MockEvent("event1"));
    eventRequest.setParameters(actionRequest.getParameterMap());
    MockEventResponse eventResponse = new MockEventResponse();
    portlet.processEvent(eventRequest, eventResponse);

    request = new MockRenderRequest(PortletMode.VIEW, WindowState.MAXIMIZED);
    request.setParameters(eventResponse.getRenderParameterMap());
    response = new MockRenderResponse();
    portlet.render(request, response);
    assertEquals("myLargeView-value3", response.getContentAsString());

    eventRequest = new MockEventRequest(new MockEvent("event3"));
    eventRequest.setParameters(actionRequest.getParameterMap());
    eventResponse = new MockEventResponse();
    portlet.processEvent(eventRequest, eventResponse);

    request = new MockRenderRequest(PortletMode.VIEW, WindowState.MAXIMIZED);
View Full Code Here

TOP

Related Classes of org.springframework.mock.web.portlet.MockEvent

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.