use of org.eclipse.jst.server.generic.servertype.definition.ServerRuntime in project webtools.servertools by eclipse.
the class GenericServerRuntimeTest method testRuntimeInfoOnly.
/**
* runtimeTypeId used as key to .runtimedef
*/
public void testRuntimeInfoOnly() throws Exception {
GenericServerRuntime runtime = ServerRuntimeUtils.getGenericServerRuntime(TEST_RUNTIMETYPE_ID);
assertNotNull(runtime);
ServerRuntime runtimeDef = runtime.getServerTypeDefinition();
assertNotNull(runtimeDef);
// Verify runtime info, and *no* server info
ServerRuntimeUtils.verifyProperty(runtimeDef.getProperty(), "foo.prop.a", "a runtime property value");
ServerRuntimeUtils.verifyNoProperty(runtimeDef.getProperty(), "foo.prop.b");
}
use of org.eclipse.jst.server.generic.servertype.definition.ServerRuntime in project webtools.servertools by eclipse.
the class ServerTypeDefinitionManagerTest method testServerDefAndRuntimeDef.
/**
* Use ServerTypeDefinitionManager to load a serverdef
* and runtimedef defined in this plugin.
*/
public void testServerDefAndRuntimeDef() {
Map properties = Collections.EMPTY_MAP;
/**
* Implementation of getServerRuntimeDefinition looks up serverdef extensions
* using the given id. It checks to see if this is a serverTypeId, or a
* runtimeTypeId.
*
* If it is a serverTypeId, it loads the serverdef and then proceeds to lookup
* runtimedef using the corresponding runtimeTypeId (a server has one runtime,
* a runtime may have many servers). It combines the serverdef and the runtimedef
* to create the ServerRuntime object. If there is no runtimedef this is an error.
*
* If the id is a runtimeTypeId, then it loads the serverdef and returns the
* ServerRuntime.
*/
ServerRuntime definition = manager.getServerRuntimeDefinition(TEST_SERVERTYPE_ID, TEST_RUNTIMETYPE_ID, properties);
assertNotNull(definition);
}
use of org.eclipse.jst.server.generic.servertype.definition.ServerRuntime in project webtools.servertools by eclipse.
the class ServerTypeDefinitionManagerTest method testServerDefOnly.
public void testServerDefOnly() {
Map properties = Collections.EMPTY_MAP;
ServerRuntime definition = manager.getServerRuntimeDefinition(TEST_SERVERDEFONLY_RUNTIMETYPE_ID, properties);
assertNotNull(definition);
definition = manager.getServerRuntimeDefinition(TEST_SERVERDEFONLY_SERVERTYPE_ID, properties);
assertNull(definition);
}
Aggregations