Search in sources :

Example 6 with Engine

use of org.eclipse.jst.server.tomcat.core.internal.xml.server40.Engine in project webtools.servertools by eclipse.

the class XmlTestCase method testServerInstance1.

/**
 * Test behavior of ServerInstance
 */
public void testServerInstance1() {
    Server server = getXml40Server("serverxml.test1");
    assertNotNull(server);
    ServerInstance si = new ServerInstance(server, "nonexistent_service", null);
    assertNull(si.getService());
    assertEquals("Service \"nonexistent_service\" was not found.", si.getStatus().getMessage());
    si = new ServerInstance(server, null, null);
    assertNotNull(si.getService());
    assertEquals("Service", si.getService().getName());
    si = new ServerInstance(server, "Service", null);
    assertNotNull(si.getService());
    assertNull(si.getEngine());
    assertEquals("Engine element not found under Service \"Service\".", si.getStatus().getMessage());
}
Also used : Server(org.eclipse.jst.server.tomcat.core.internal.xml.server40.Server) ServerInstance(org.eclipse.jst.server.tomcat.core.internal.xml.server40.ServerInstance)

Aggregations

Server (org.eclipse.jst.server.tomcat.core.internal.xml.server40.Server)6 Connector (org.eclipse.jst.server.tomcat.core.internal.xml.server40.Connector)4 Engine (org.eclipse.jst.server.tomcat.core.internal.xml.server40.Engine)4 Host (org.eclipse.jst.server.tomcat.core.internal.xml.server40.Host)4 Listener (org.eclipse.jst.server.tomcat.core.internal.xml.server40.Listener)4 Service (org.eclipse.jst.server.tomcat.core.internal.xml.server40.Service)4 ServerInstance (org.eclipse.jst.server.tomcat.core.internal.xml.server40.ServerInstance)3 Context (org.eclipse.jst.server.tomcat.core.internal.xml.server40.Context)2 Path (org.eclipse.core.runtime.Path)1