use of com.google.cloud.dialogflow.v2.Context in project webtools.servertools by eclipse.
the class XmlTestCase method testServerInstance50.
/**
* Test reading of the default server.xml provided by the
* current Tomcat 5.0 release using ServerInstance.
*/
public void testServerInstance50() {
Server server = getXml40Server("default.serverxml.50");
assertNotNull(server);
ServerInstance si = new ServerInstance(server, null, null);
assertEquals(2, server.getListenerCount());
Listener[] listeners = si.getListeners();
assertEquals("org.apache.catalina.mbeans.ServerLifecycleListener", listeners[0].getClassName());
assertEquals("org.apache.catalina.mbeans.GlobalResourcesLifecycleListener", listeners[1].getClassName());
Service service = si.getService();
assertNotNull(service);
assertEquals("Catalina", service.getName());
assertEquals("8080", si.getConnector(0).getPort());
assertNull(si.getConnector(0).getProtocol());
assertEquals("8009", si.getConnector(1).getPort());
assertEquals("AJP/1.3", si.getConnector(1).getProtocol());
Connector[] connectors = si.getConnectors();
assertEquals(2, connectors.length);
assertEquals("8080", connectors[0].getPort());
assertNull(connectors[0].getProtocol());
assertEquals("8009", connectors[1].getPort());
assertEquals("AJP/1.3", connectors[1].getProtocol());
Engine engine = si.getEngine();
assertNotNull(engine);
assertEquals("Catalina", engine.getName());
assertEquals("localhost", engine.getDefaultHost());
Host host = si.getHost();
assertNotNull(host);
assertEquals("localhost", host.getName());
assertEquals("webapps", host.getAppBase());
assertEquals("true", host.getAttributeValue("unpackWARs"));
assertEquals("true", host.getAttributeValue("autoDeploy"));
Context[] contexts = si.getContexts();
assertEquals(0, contexts.length);
}
use of com.google.cloud.dialogflow.v2.Context in project webtools.servertools by eclipse.
the class Tomcat32TestConfiguration method verifyPublishedModule.
protected void verifyPublishedModule(IPath baseDir, IModule module) throws Exception {
Tomcat32TestConfiguration config = new Tomcat32TestConfiguration(null);
config.load(baseDir.append("conf"), null);
ServerInstance serverInstance = config.getServerInstance();
Context context = serverInstance.getContext(module.getName());
String deployDir = getTomcatServer().getDeployDirectory();
if ("webapps".equals(deployDir)) {
assertEquals("webapps/" + module.getName(), context.getDocBase());
} else {
assertEquals(getTomcatServerBehaviour().getModuleDeployDirectory(module).toOSString(), context.getDocBase());
}
verifyPublishedModuleFiles(module);
}
use of com.google.cloud.dialogflow.v2.Context in project webtools.servertools by eclipse.
the class Tomcat41TestConfiguration method verifyPublishedModule.
protected void verifyPublishedModule(IPath baseDir, IModule module) throws Exception {
Tomcat41TestConfiguration config = new Tomcat41TestConfiguration(null);
config.load(baseDir.append("conf"), null);
ServerInstance serverInstance = config.getServerInstance();
Context context = serverInstance.getContext(module.getName());
String deployDir = getTomcatServer().getDeployDirectory();
if ("webapps".equals(deployDir)) {
assertEquals(module.getName(), context.getDocBase());
} else {
assertEquals(getTomcatServerBehaviour().getModuleDeployDirectory(module).toOSString(), context.getDocBase());
}
verifyPublishedModuleFiles(module);
}
use of com.google.cloud.dialogflow.v2.Context in project webtools.servertools by eclipse.
the class Tomcat50TestConfiguration method verifyPublishedModule.
protected void verifyPublishedModule(IPath baseDir, IModule module) throws Exception {
Tomcat50TestConfiguration config = new Tomcat50TestConfiguration(null);
config.load(baseDir.append("conf"), null);
ServerInstance serverInstance = config.getServerInstance();
Context context = serverInstance.getContext(module.getName());
String deployDir = getTomcatServer().getDeployDirectory();
if ("webapps".equals(deployDir)) {
assertEquals(module.getName(), context.getDocBase());
} else {
assertEquals(getTomcatServerBehaviour().getModuleDeployDirectory(module).toOSString(), context.getDocBase());
}
verifyPublishedModuleFiles(module);
}
use of com.google.cloud.dialogflow.v2.Context in project webtools.servertools by eclipse.
the class Tomcat70TestConfiguration method verifyPublishedModule.
protected void verifyPublishedModule(IPath baseDir, IModule module) throws Exception {
Tomcat70TestConfiguration config = new Tomcat70TestConfiguration(null);
config.load(baseDir.append("conf"), null);
ServerInstance serverInstance = config.getServerInstance();
Context context = serverInstance.getContext(module.getName());
String deployDir = getTomcatServer().getDeployDirectory();
if ("webapps".equals(deployDir)) {
assertEquals(module.getName(), context.getDocBase());
} else {
assertEquals(getTomcatServerBehaviour().getModuleDeployDirectory(module).toOSString(), context.getDocBase());
}
verifyPublishedModuleFiles(module);
}
Aggregations