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); }
public void test_init_noBaseParameter() throws ServletException { config.parameterValue = null; servlet.init(config); assertEquals("prefix value", "test/testData/static", servlet.prefix); }
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); }