コード例 #1
0
 public void test_doGet_noPathInfo() {
   TestUtil.writeFile("_test_", "Data for empty path.");
   servlet.prefix = "_test_";
   servlet.doGet(new ServletRequestFixture(null), response);
   TestUtil.deleteTree("_test_");
   assertEquals("information returned", "Data for empty path.", response.toString());
 }
コード例 #2
0
 public void test_doGet_basics() {
   (new File("_test_")).mkdir();
   TestUtil.writeFile("_test_/abc", "Sample file to return.");
   servlet.prefix = "_test_/";
   servlet.doGet(new ServletRequestFixture("abc"), response);
   TestUtil.deleteTree("_test_");
   assertEquals("information returned", "Sample file to return.", response.toString());
 }