use of org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour in project webtools.servertools by eclipse.
the class AbstractTomcatServerTestCase method verifyLegacyDeployConfig.
/**
* Verify configuration when deployment directory is unset.
* Deployment directory should default to "webapps".
* @throws Exception
*/
public void verifyLegacyDeployConfig() throws Exception {
TomcatServer ts = getTomcatServer();
assertNotNull(ts);
ts.setDeployDirectory("webapps");
TomcatServerBehaviour tsb = getTomcatServerBehaviour();
assertNotNull(tsb);
assertEquals("webapps", ts.getDeployDirectory());
// Verify that legacy setting results in attribute removal
Server svr = (Server) getServer().loadAdapter(Server.class, null);
assertNotNull(svr);
String attr = svr.getAttribute("webapps", (String) null);
assertNull(attr);
IPath tempDir = tsb.getTempDirectory();
IPath baseDir = tsb.getRuntimeBaseDirectory();
assertEquals(tempDir, baseDir);
IPath deployDir = tsb.getServerDeployDirectory();
assertEquals(baseDir.append("webapps"), deployDir);
}
Aggregations