use of org.eclipse.jst.server.generic.core.internal.ServerTypeDefinitionManager in project webtools.servertools by eclipse.
the class ServerDefinitionTypeTest method testResolve.
public void testResolve() {
ServerTypeDefinitionManager serverTypeDefinitionManager = CorePlugin.getDefault().getServerTypeDefinitionManager();
assertNotNull(serverTypeDefinitionManager);
ServerRuntime[] types = serverTypeDefinitionManager.getServerTypeDefinitions();
assertNotNull(types);
assertTrue(types.length > 0);
for (int i = 0; i < types.length; i++) {
ServerRuntime definition = types[i];
String wd = definition.getStart().getWorkingDirectory();
String resolved = definition.getResolver().resolveProperties(wd);
assertFalse(resolved.indexOf("${") >= 0);
}
}
use of org.eclipse.jst.server.generic.core.internal.ServerTypeDefinitionManager in project webtools.servertools by eclipse.
the class ServerDefinitionTypeTest method testGetTypes.
public void testGetTypes() {
IExtension[] extensions = ExtensionPointUtil.getGenericServerDefinitionExtensions();
int noOfExtensions = 0;
for (int i = 0; i < extensions.length; i++) {
noOfExtensions += ExtensionPointUtil.getConfigurationElements(extensions[i]).length;
}
ServerTypeDefinitionManager serverTypeDefinitionManager = CorePlugin.getDefault().getServerTypeDefinitionManager();
assertNotNull(serverTypeDefinitionManager);
ServerRuntime[] types = serverTypeDefinitionManager.getServerTypeDefinitions();
assertNotNull(types);
assertEquals(noOfExtensions, types.length);
}
Aggregations