use of org.eclipse.jst.server.tomcat.core.internal.xml.server32.ContextManager in project webtools.servertools by eclipse.
the class XmlTestCase method testDefaultServerXml32.
/**
* Test reading of the default server.xml provided by the
* current Tomcat 3.2.
*/
public void testDefaultServerXml32() {
org.eclipse.jst.server.tomcat.core.internal.xml.server32.Server server = getXml32Server("default.serverxml.32");
assertNotNull(server);
ContextManager contextManager = server.getContextManager();
assertNotNull(contextManager);
assertEquals(2, contextManager.getConnectorCount());
assertNotNull(contextManager.getConnector(0));
Parameter parameter = contextManager.getConnector(0).getParameter(0);
assertEquals("handler", parameter.getName());
assertEquals("org.apache.tomcat.service.http.HttpConnectionHandler", parameter.getValue());
parameter = contextManager.getConnector(0).getParameter(1);
assertEquals("port", parameter.getName());
assertEquals("8080", parameter.getValue());
assertNotNull(contextManager.getConnector(1));
parameter = contextManager.getConnector(1).getParameter(0);
assertEquals("handler", parameter.getName());
assertEquals("org.apache.tomcat.service.connector.Ajp12ConnectionHandler", parameter.getValue());
parameter = contextManager.getConnector(1).getParameter(1);
assertEquals("port", parameter.getName());
assertEquals("8007", parameter.getValue());
assertEquals(2, contextManager.getContextCount());
assertNotNull(contextManager.getContext(0));
assertEquals("/examples", contextManager.getContext(0).getPath());
assertNotNull(contextManager.getContext(1));
assertEquals("/admin", contextManager.getContext(1).getPath());
}
Aggregations