예제 #1
0
 public void test_init_absolutePath() throws ServletException {
   String os = System.getProperty("os.name");
   if (os.startsWith("Windows")) {
     config.parameterValue = "C:/Temp";
   } else {
     config.parameterValue = "/abc/def";
   }
   servlet.init(config);
   assertEquals("prefix value", config.parameterValue, servlet.prefix);
 }
예제 #2
0
 public void test_init_noBaseParameter() throws ServletException {
   config.parameterValue = null;
   servlet.init(config);
   assertEquals("prefix value", "test/testData/static", servlet.prefix);
 }
예제 #3
0
 public void test_init_relativePath() throws ServletException {
   config.parameterValue = "x/y/z";
   servlet.init(config);
   assertEquals("prefix value", "test/testData/x/y/z", servlet.prefix);
 }