@Before public void setUp() throws Exception { mapping.addForwardConfig(new ActionForward("success", "/jsp/choosePOI.jsp", false)); request = (MockHttpServletRequest) log2Protobuf.getInstance().getProtobuf("mock"); request.addParameter("poi", ""); request.addParameter("json", ""); request.addParameter("width", "480"); request.addParameter("height", "800"); request.addParameter("clientInfo", "{}"); }
@Test public void testDoActionAction() { try { if (request == null) { Assert.fail(failString); } choosePOIAction.doAction(mapping, request, response); Assert.assertNotNull(request.getParameter("poi")); Assert.assertNotNull(request.getParameter("json")); Assert.assertNotNull(request.getParameter("clientInfo")); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }