use of com.mockobjects.servlet.MockHttpServletResponse in project struts by apache.
the class ServletActionContextTest method setUp.
public void setUp() {
Map<String, Object> extraContext = new HashMap<>();
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
servletContext = new MockServletContext();
extraContext.put(HTTP_REQUEST, request);
extraContext.put(HTTP_RESPONSE, response);
extraContext.put(SERVLET_CONTEXT, servletContext);
actionContext = ActionContext.of(extraContext).bind();
}
use of com.mockobjects.servlet.MockHttpServletResponse in project struts by apache.
the class RolesInterceptorTest method testHandleRejection.
public void testHandleRejection() throws Exception {
MockHttpServletResponse response = new MockHttpServletResponse();
response.setExpectedError(response.SC_FORBIDDEN);
interceptor.handleRejection(null, response);
response.verify();
}
Aggregations