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());
}
Aggregations