Examples of MockPortletRequest


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

      }
    }.runTest();
  }

  public void testExposeRequestAttributesSunnyDay() throws Exception {
    MockPortletRequest request = new MockPortletRequest();
    Map attributes = new HashMap();
    attributes.put("ace", "Rick Hunter");
    attributes.put("mentor", "Roy Fokker");
    PortletUtils.exposeRequestAttributes(request, attributes);
    assertEquals("Obviously all of the entries in the supplied attributes Map are not being copied over (exposed)",
        attributes.size(), countElementsIn(request.getAttributeNames()));
    assertEquals("Rick Hunter", request.getAttribute("ace"));
    assertEquals("Roy Fokker", request.getAttribute("mentor"));
  }
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.