RequestProcessor
90919293949596979899100101102
@Test public void testProcessCachedMessages() throws ServletException, IOException { RequestPreprocessor handler = createMock(RequestPreprocessor.class); handler.preprocessRequest(null); replay(handler); ControllerRequestProcessor controllerRequestProcessor = new ControllerRequestProcessor(); controllerRequestProcessor.setRequestPreprocessor(handler);
30313233343536373839404142434445
{ @Test public void testPopulateActionForm() throws Exception { ServletActionContext sac = getActionContext(); RequestPreprocessor requestPreprocessor = newMock(RequestPreprocessor.class); Preprocess preprocess = getPreprocess(requestPreprocessor); HttpServletRequest request = newMock(HttpServletRequest.class); expect(sac.getRequest()).andReturn(request); requestPreprocessor.preprocessRequest(request); replayMocks(); preprocess.execute(sac); verifyMocks(); }