Examples of CloudFoundryApplicationModule


Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

    Collection<CloudFoundryApplicationModule> appModules = cloudServer.getExistingCloudModules();
    assertNotNull("Expected list of cloud modules after deploying: " + appPrefix, appModules);
    assertTrue("Expected one application module for " + appPrefix + " but got: " + appModules.size(),
        appModules.size() == 1);

    CloudFoundryApplicationModule applicationModule = appModules.iterator().next();
    assertEquals(expectedAppName, applicationModule.getDeployedApplicationName());

  }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

    Collection<CloudFoundryApplicationModule> appModules = cloudServer.getExistingCloudModules();
    assertNotNull("Expected list of cloud modules after deploying: " + appPrefix, appModules);
    assertTrue("Expected one application module for " + appPrefix + " but got: " + appModules.size(),
        appModules.size() == 1);

    CloudFoundryApplicationModule applicationModule = appModules.iterator().next();
    assertEquals(expectedAppName, applicationModule.getDeployedApplicationName());

  }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

    // Invoke the helper method
    assertDeployApplicationStartMode(prefix);

    // Verify it is deployed
    CloudFoundryApplicationModule appModule = assertApplicationIsDeployed(prefix, IServer.STATE_STARTED);
    assertNotNull("Expected non-null Cloud Foundry application module", appModule);

    IModule module = getModule(harness.getDefaultWebAppProjectName());

    // Verify the app is running
    assertApplicationIsRunning(module, prefix);

    // Now CHECK that the expected conditions in the helper method assert to
    // expected values
    appModule = assertCloudFoundryModuleExists(module, prefix);

    assertNotNull(
        "No Cloud Application mapping in Cloud module. Application mapping failed or application did not deploy",
        appModule.getApplication());

    assertEquals(IServer.STATE_STARTED, appModule.getState());
    assertEquals(AppState.STARTED, appModule.getApplication().getState());

    // Check the module state in the WST server is correct
    int moduleState = server.getModuleState(new IModule[] { module });
    assertEquals(IServer.STATE_STARTED, moduleState);
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

    boolean stopMode = true;

    deployApplication(prefix, stopMode);

    // Invoke the helper method
    CloudFoundryApplicationModule appModule = assertApplicationIsDeployed(prefix, IServer.STATE_STOPPED);
    assertNotNull("Expected non-null Cloud Foundry application module", appModule);

    // Now CHECK that the expected conditions in the helper method assert to
    // expected values
    IModule module = getModule(harness.getDefaultWebAppProjectName());

    appModule = assertCloudFoundryModuleExists(module, prefix);

    assertNotNull(
        "No Cloud Application mapping in Cloud module. Application mapping failed or application did not deploy",
        appModule.getApplication());

    assertEquals(IServer.STATE_STOPPED, appModule.getState());
    assertEquals(AppState.STOPPED, appModule.getApplication().getState());

    // Check the module state in the WST server is correct
    int moduleState = server.getModuleState(new IModule[] { module });
    assertEquals(IServer.STATE_STOPPED, moduleState);
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

  }

  public void testStopApplication() throws Exception {
    String prefix = "stopApplication";
    createWebApplicationProject();
    CloudFoundryApplicationModule appModule = assertDeployApplicationStartMode(prefix);

    assertStopModule(appModule);

    // Check the helper method assertions have correct values
    assertTrue("Expected application to be stopped", appModule.getApplication().getState().equals(AppState.STOPPED));
    assertTrue("Expected application to be stopped", appModule.getState() == IServer.STATE_STOPPED);
  }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

  public void testStartStopAfterDeployment() throws Exception {
    // Tests that after an application has been deployed and started, if
    // stopped and restarted, the application starts without problems
    String prefix = "startStopApplication";
    createWebApplicationProject();
    CloudFoundryApplicationModule appModule = assertDeployApplicationStartMode(prefix);

    assertStopModule(appModule);

    assertStartModule(appModule);

    assertEquals(IServer.STATE_STARTED, appModule.getState());
    assertEquals(AppState.STARTED, appModule.getApplication().getState());
  }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

    // it is started.
    String prefix = "stopModeThenStartApp";
    createWebApplicationProject();
    deployApplication(prefix, true);

    CloudFoundryApplicationModule appModule = assertApplicationIsDeployed(prefix, IServer.STATE_STOPPED);

    assertStartModule(appModule);
  }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

    // Tests the server behaviour API that checks if the application is
    // running
    String prefix = "isApplicationRunning";
    createWebApplicationProject();

    CloudFoundryApplicationModule appModule = assertDeployApplicationStartMode(prefix);

    // Verify that the server behaviour API to determine that an app is
    // running tests correctly
    assertTrue(serverBehavior.isApplicationRunning(appModule, new NullProgressMonitor()));

    // The following are the expected conditions for the server behaviour to
    // determine that the app is running
    String appName = harness.getDefaultWebAppName(prefix);
    assertTrue(appModule.getState() == IServer.STATE_STARTED);
    assertNotNull(serverBehavior.getApplicationStats(appName, new NullProgressMonitor()));
    assertNotNull(serverBehavior.getInstancesInfo(appName, new NullProgressMonitor()));
  }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

    // application module for the deployed
    // application
    serverBehavior.connect(new NullProgressMonitor());

    appModules = cloudServer.getExistingCloudModules();
    CloudFoundryApplicationModule appModule = appModules.iterator().next();

    assertEquals(expectedAppName, appModule.getDeployedApplicationName());

    assertApplicationIsRunning(appModule);
  }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.CloudFoundryApplicationModule

    // Once the application is started, verify that the Cloud module (the
    // "Enhanced" WST
    // Imodule that contains additional CF related information) is valid,
    // and mapped to
    // an actual CloudApplication representing the deployed application.
    CloudFoundryApplicationModule appModule = assertCloudFoundryModuleExists(module, appPrefix);

    assertNotNull("No Cloud Application mapping in Cloud module. Failed to refresh deployed application",
        appModule.getApplication());

    // The app state in the cloud module must be correct
    assertEquals(expectedAppState, appModule.getState());

    return appModule;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.