use of net.sourceforge.stripes.mock.MockHttpSession in project jspwiki by apache.
the class TestEngine method newHttpRequest.
/**
* Creates a correctly-instantiated mock HttpServletRequest with an associated
* HttpSession and path.
* @param path the path relative to the wiki context, for example "/Wiki.jsp"
* @return the new request
*/
public MockHttpServletRequest newHttpRequest(String path) {
MockHttpServletRequest request = new MockHttpServletRequest("/JSPWiki", path);
request.setSession(new MockHttpSession(this.getServletContext()));
request.addLocale(new Locale(""));
return request;
}
Aggregations