Search in sources :

Example 1 with ISubsystemController

use of org.jboss.ide.eclipse.as.wtp.core.server.behavior.ISubsystemController in project jbosstools-openshift by jbosstools.

the class OpenShiftSubsystemTest method testSubsystemsEAP.

@Test
public void testSubsystemsEAP() throws Exception {
    IServer s1 = OpenShiftServerTestUtils.createOpenshift3Server("example", OpenshiftEapProfileDetector.PROFILE);
    IControllableServerBehavior beh = (IControllableServerBehavior) s1.loadAdapter(IControllableServerBehavior.class, new NullProgressMonitor());
    String[] systems = new String[] { IControllableServerBehavior.SYSTEM_LAUNCH, IControllableServerBehavior.SYSTEM_MODULES, IControllableServerBehavior.SYSTEM_PUBLISH, IControllableServerBehavior.SYSTEM_SHUTDOWN, IFilesystemController.SYSTEM_ID, IDeploymentOptionsController.SYSTEM_ID, IModuleDeployPathController.SYSTEM_ID };
    String[] expected = new String[] { "org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController", "org.jboss.tools.openshift.core.server.behavior.eap.OpenShiftEapModulesController", "org.jboss.tools.openshift.core.server.behavior.eap.OpenShiftEapPublishController", "org.jboss.tools.openshift.core.server.behavior.OpenShiftShutdownController", "org.jboss.ide.eclipse.as.wtp.core.server.behavior.LocalFilesystemController", "org.jboss.tools.openshift.core.server.behavior.OpenShiftDeploymentOptionsController", "org.jboss.tools.openshift.core.server.behavior.eap.OpenShiftEapDeployPathController" };
    for (int i = 0; i < systems.length; i++) {
        ISubsystemController c = beh.getController(systems[i]);
        assertEquals(expected[i], c.getClass().getName());
    }
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) IServer(org.eclipse.wst.server.core.IServer) IControllableServerBehavior(org.jboss.ide.eclipse.as.wtp.core.server.behavior.IControllableServerBehavior) ISubsystemController(org.jboss.ide.eclipse.as.wtp.core.server.behavior.ISubsystemController) Test(org.junit.Test)

Example 2 with ISubsystemController

use of org.jboss.ide.eclipse.as.wtp.core.server.behavior.ISubsystemController in project jbosstools-openshift by jbosstools.

the class OpenShiftSubsystemTest method testOpenshift3Standard.

private void testOpenshift3Standard(IServer s1) throws CoreException {
    IControllableServerBehavior beh = (IControllableServerBehavior) s1.loadAdapter(IControllableServerBehavior.class, new NullProgressMonitor());
    String[] systems = new String[] { IControllableServerBehavior.SYSTEM_LAUNCH, IControllableServerBehavior.SYSTEM_MODULES, IControllableServerBehavior.SYSTEM_PUBLISH, IControllableServerBehavior.SYSTEM_SHUTDOWN, IFilesystemController.SYSTEM_ID, IDeploymentOptionsController.SYSTEM_ID, IModuleDeployPathController.SYSTEM_ID };
    String[] expected = new String[] { "org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController", "org.jboss.tools.as.core.server.controllable.subsystems.internal.NoOpModuleController", "org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController", "org.jboss.tools.openshift.core.server.behavior.OpenShiftShutdownController", "org.jboss.ide.eclipse.as.wtp.core.server.behavior.LocalFilesystemController", "org.jboss.tools.openshift.core.server.behavior.OpenShiftDeploymentOptionsController", "org.jboss.tools.as.core.server.controllable.subsystems.internal.ModuleDeployPathController" };
    for (int i = 0; i < systems.length; i++) {
        ISubsystemController c = beh.getController(systems[i]);
        assertEquals(expected[i], c.getClass().getName());
    }
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) IControllableServerBehavior(org.jboss.ide.eclipse.as.wtp.core.server.behavior.IControllableServerBehavior) ISubsystemController(org.jboss.ide.eclipse.as.wtp.core.server.behavior.ISubsystemController)

Aggregations

NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 IControllableServerBehavior (org.jboss.ide.eclipse.as.wtp.core.server.behavior.IControllableServerBehavior)2 ISubsystemController (org.jboss.ide.eclipse.as.wtp.core.server.behavior.ISubsystemController)2 IServer (org.eclipse.wst.server.core.IServer)1 Test (org.junit.Test)1