Esempio 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());
 }
Esempio n. 2
0
 private void makeRequest(String method, String action) {
   request = helper.createMockRequest(method);
   helper.setActionName(action);
 }
Esempio n. 3
0
 public void testGetSetDateRendersSetDate() throws Exception {
   makeRequest("GET", "setDate");
   controller.handle(request);
   assertTrue(helper.shouldRender("debug/setDate.jsp"));
 }