use of org.jboss.tools.openshift.internal.ui.server.OpenShiftServerAdapterFactory in project jbosstools-openshift by jbosstools.
the class OpenShiftServerAdapterFactoryTest method testLoadWebModule.
@Test
public void testLoadWebModule() {
OpenShiftServerAdapterFactory factory = new OpenShiftServerAdapterFactory();
IServer server = mock(IServer.class);
OpenShiftServer realServer = mock(OpenShiftServer.class);
when(server.loadAdapter(eq(OpenShiftServer.class), isA(IProgressMonitor.class))).thenReturn(realServer);
IServerModule serverModule = factory.getAdapter(server, IServerModule.class);
assertNotNull(serverModule);
IModule[] module = serverModule.getModule();
assertNotNull(module);
assertNotNull(module[0].loadAdapter(IWebModule.class, null));
}
Aggregations