Exemplo n.º 1
0
 public void testPostSetDateRendersWelcome() throws Exception {
   makeRequest("POST", "setDate");
   request.setParameter("date", "1/1/2005");
   controller.handle(request);
   assertTrue(helper.shouldRender("welcome.jsp"));
   assertEquals(DateUtil.dateFromString("1/1/2005"), TimeSource.time());
 }
Exemplo n.º 2
0
 private void makeRequest(String method, String action) {
   request = helper.createMockRequest(method);
   helper.setActionName(action);
 }
Exemplo n.º 3
0
 public void testGetSetDateRendersSetDate() throws Exception {
   makeRequest("GET", "setDate");
   controller.handle(request);
   assertTrue(helper.shouldRender("debug/setDate.jsp"));
 }