Examples of MockPortletConfig


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

  public void testNoDetectAllHandlerMappingsWithParameterRenderRequest() throws Exception {
    DispatcherPortlet complexDispatcherPortlet = new DispatcherPortlet();
    complexDispatcherPortlet.setContextClass(ComplexPortletApplicationContext.class);
    complexDispatcherPortlet.setNamespace("test");
    complexDispatcherPortlet.setDetectAllHandlerMappings(false);
    complexDispatcherPortlet.init(new MockPortletConfig(getPortletContext(), "complex"));
    MockRenderRequest request = new MockRenderRequest();
    MockRenderResponse response = new MockRenderResponse();
    request.setParameter("myParam", "test1");
    complexDispatcherPortlet.doDispatch(request, response);
    Map<?, ?> model = (Map<?, ?>) request.getAttribute(ViewRendererServlet.MODEL_ATTRIBUTE);
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.