use of org.grails.plugins.testing.GrailsMockHttpServletResponse in project grails-core by grails.
the class MockGrailsApplication method bindMockHttpRequest.
private GrailsWebRequest bindMockHttpRequest() {
GrailsMockHttpServletRequest mockRequest = new GrailsMockHttpServletRequest();
GrailsMockHttpServletResponse mockResponse = new GrailsMockHttpServletResponse();
GrailsWebRequest webRequest = new GrailsWebRequest(mockRequest, mockResponse, mockRequest.getServletContext());
mockRequest.setAttribute(GrailsApplicationAttributes.WEB_REQUEST, webRequest);
RequestContextHolder.setRequestAttributes(webRequest);
return webRequest;
}
Aggregations