Exemplo n.º 1
0
  /**
   * Tests that the EditStartersModel is parsed and that existing starters already present on the
   * project are initially selected.
   */
  @Test
  public void existingStartersSelected() throws Exception {
    IProject project = harness.createBootProject("foo", withStarters("web", "actuator"));
    ISpringBootProject bootProject = springBootCore.project(project);
    EditStartersModel wizard = createWizard(project);
    assertTrue(wizard.isSupported());

    assertEquals(bootProject.getBootVersion(), wizard.getBootVersion());
    assertStarterDeps(wizard.dependencies.getCurrentSelection(), "web", "actuator");
  }
Exemplo n.º 2
0
  @Test
  public void serviceUnavailable() throws Exception {
    String bootVersion = BOOT_1_3_X_RELEASE;
    IProject project =
        harness.createBootProject(
            "foo",
            bootVersion(bootVersion), // boot version fixed
            withStarters("web"));

    initializr.makeUnavailable();

    EditStartersModel wizard = createWizard(project);
    assertFalse(wizard.isSupported());
  }