use of org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour in project webtools.servertools by eclipse.
the class AbstractTomcatServerTestCase method verifyDefaultDeployConfig.
/*
* Tests to verify modules are deployed correctly per configuration
*/
/**
* @throws Exception
*/
public void verifyDefaultDeployConfig() throws Exception {
TomcatServer ts = getTomcatServer();
assertNotNull(ts);
TomcatServerBehaviour tsb = getTomcatServerBehaviour();
assertNotNull(tsb);
assertEquals(ITomcatServerWorkingCopy.DEFAULT_DEPLOYDIR, ts.getDeployDirectory());
IPath tempDir = tsb.getTempDirectory();
IPath baseDir = tsb.getRuntimeBaseDirectory();
assertEquals(tempDir, baseDir);
IPath deployDir = tsb.getServerDeployDirectory();
assertEquals(baseDir.append(ITomcatServerWorkingCopy.DEFAULT_DEPLOYDIR), deployDir);
}
use of org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour in project webtools.servertools by eclipse.
the class AbstractTomcatServerTestCase method verifyLegacyRemovePublish.
/**
* @throws Exception
*/
public void verifyLegacyRemovePublish() throws Exception {
IModule webModule = ModuleTestCase.webModule;
IServerWorkingCopy wc = getServer().createWorkingCopy();
// Unset the deployment directory
((TomcatServer) wc.loadAdapter(TomcatServer.class, null)).setDeployDirectory(null);
wc.modifyModules(null, new IModule[] { webModule }, null);
wc.save(true, null);
getServer().publish(IServer.PUBLISH_FULL, null);
TomcatServerBehaviour tsb = getTomcatServerBehaviour();
IPath baseDir = tsb.getRuntimeBaseDirectory();
IPath moduleDir = baseDir.append("webapps").append(ModuleTestCase.webModule.getName());
assertFalse(moduleDir.toFile().exists());
}
use of org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour in project webtools.servertools by eclipse.
the class AbstractTomcatServerTestCase method verifyDefaultRemovePublish.
/**
* @throws Exception
*/
public void verifyDefaultRemovePublish() throws Exception {
IModule webModule = ModuleTestCase.webModule;
IServerWorkingCopy wc = getServer().createWorkingCopy();
wc.modifyModules(null, new IModule[] { webModule }, null);
wc.save(true, null);
getServer().publish(IServer.PUBLISH_FULL, null);
TomcatServerBehaviour tsb = getTomcatServerBehaviour();
IPath baseDir = tsb.getRuntimeBaseDirectory();
IPath moduleDir = baseDir.append(ITomcatServerWorkingCopy.DEFAULT_DEPLOYDIR).append(ModuleTestCase.webModule.getName());
assertFalse(moduleDir.toFile().exists());
}
use of org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour in project webtools.servertools by eclipse.
the class AbstractTomcatServerTestCase method verifyDefaultAddPublish.
/**
* @throws Exception
*/
public void verifyDefaultAddPublish() throws Exception {
IModule webModule = ModuleTestCase.webModule;
IServerWorkingCopy wc = getServer().createWorkingCopy();
wc.modifyModules(new IModule[] { webModule }, null, null);
wc.save(true, null);
getServer().publish(IServer.PUBLISH_FULL, null);
TomcatServerBehaviour tsb = getTomcatServerBehaviour();
IPath baseDir = tsb.getRuntimeBaseDirectory();
IPath moduleDir = baseDir.append(ITomcatServerWorkingCopy.DEFAULT_DEPLOYDIR).append(ModuleTestCase.webModule.getName());
assertTrue(moduleDir.toFile().exists());
verifyPublishedModule(baseDir, ModuleTestCase.webModule);
}
use of org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour in project webtools.servertools by eclipse.
the class AbstractTomcatServerTestCase method verifyLegacyAddPublish.
/**
* @throws Exception
*/
public void verifyLegacyAddPublish() throws Exception {
IModule webModule = ModuleTestCase.webModule;
IServerWorkingCopy wc = getServer().createWorkingCopy();
// Unset the deployment directory
((TomcatServer) wc.loadAdapter(TomcatServer.class, null)).setDeployDirectory(null);
wc.modifyModules(new IModule[] { webModule }, null, null);
wc.save(true, null);
getServer().publish(IServer.PUBLISH_FULL, null);
TomcatServerBehaviour tsb = getTomcatServerBehaviour();
IPath baseDir = tsb.getRuntimeBaseDirectory();
IPath moduleDir = baseDir.append("webapps").append(ModuleTestCase.webModule.getName());
assertTrue(moduleDir.toFile().exists());
verifyPublishedModule(baseDir, ModuleTestCase.webModule);
}
Aggregations