use of org.nutz.mvc.impl.processor.ViewProcessor in project nutz by nutzam.
the class EViewProcessor method test_error_processor.
@Test
public void test_error_processor() throws Throwable {
ViewProcessor p = new EViewProcessor();
ActionContext ac = new ActionContext();
ac.setRequest(request).setResponse(response).setServletContext(servletContext);
Throwable t = new Throwable();
ac.setError(t);
p.process(ac);
Object obj = request.getAttribute(ViewProcessor.DEFAULT_ATTRIBUTE);
assertNotNull(obj);
assertTrue(obj instanceof Throwable);
assertEquals(t, obj);
}
Aggregations