Package de.idos.updates

Examples of de.idos.updates.NumericVersion


    @Then("^the system uses the file on the classpath to configure itself$")
    public void the_system_uses_the_file_on_the_classpath_to_configure_itself() throws Throwable {
      Updater updater = updateSystem.checkForUpdates();
      updater.runCheck();
      Version latestVersion = updater.getLatestVersion();
        assertThat(latestVersion, is(sameVersionAs(new NumericVersion(1, 0, 1))));
    }
View Full Code Here


    @Then("^the system uses the file in the working directory to configure itself$")
    public void the_system_uses_the_file_in_the_working_directory_to_configure_itself() throws Throwable {
      Updater updater = updateSystem.checkForUpdates();
      updater.runCheck();
      Version latestVersion = updater.getLatestVersion();
        assertThat(latestVersion, is(sameVersionAs(new NumericVersion(1, 0, 2))));
    }
View Full Code Here

  public void the_repository_contains_a_more_recent_version() throws Throwable {
    File versionsFolder = new File(repositoryFolder, AVAILABLE_VERSIONS);
    File latestVersionFolder = new File(versionsFolder, "4.2.1");
    latestVersionFolder.mkdir();
    new File(latestVersionFolder, "content").createNewFile();
    this.latestVersion = new NumericVersion(4, 2, 1);
  }
View Full Code Here

  @Given("^the repository contains several new versions$")
  public void the_repository_contains_several_new_versions() throws Throwable {
    File versionsFolder = new File(repositoryFolder, AVAILABLE_VERSIONS);
    new File(versionsFolder, "4.2.1").mkdir();
    new File(versionsFolder, "4.2.2").mkdir();
    this.latestVersion = new NumericVersion(4, 2, 2);
  }
View Full Code Here

    File latestVersionFolder = new File(versionsFolder, "4.2.1");
    latestVersionFolder.mkdir();
    File staging = folder.newFolder("staging");
    File content = ZipFileMother.createContentFileForZip(staging, "contentFromZip");
    ZipFileMother.createZipFileInTemporaryFolder(latestVersionFolder, "v4.2.1.zip", content);
    this.latestVersion = new NumericVersion(4, 2, 1);
  }
View Full Code Here

  }

  @Test
  public void extendsBaseUrlWhenListingContent() throws Exception {
    HttpInstaller installer = createInstaller(new NullInstallation());
    List<String> elementsToInstall = installer.findAllElementsToInstall(new NumericVersion(5, 0, 4));
    assertThat(elementsToInstall.size(), is(2));
  }
View Full Code Here

  @Test
  public void extendsBaseUrlWhenDownloadingElements() throws Exception {
    Installation installation = FilesystemInstallation.create(folder.getRoot(), new NullReport());
    HttpInstaller installer = createInstaller(installation);
    installer.installElement("fileToUpdate", new NumericVersion(5, 0, 4));
    assertThat(new File(folder.getRoot(), "fileToUpdate").exists(), is(true));
  }
View Full Code Here

  }

  @Test(timeout = 5000)
  public void deletesVersionIfErrorsOccurDuringTransfer() throws Exception {
    final CountDownLatch countDownLatch = new CountDownLatch(1);
    NumericVersion version = new NumericVersion(5, 0, 4);
    Installation installation = mock(Installation.class);
    doThrow(new RuntimeException()).when(installation).addContent(isA(DataInVersion.class));
    doAnswer(new Answer() {
      @Override
      public Object answer(InvocationOnMock invocation) throws Throwable {
View Full Code Here

  }

  @Test
  public void retrievesLatestVersionFromServer() throws Exception {
    Version latestVersion = repository.getLatestVersion();
    assertThat(latestVersion, is(sameVersionAs(new NumericVersion(5, 0, 4))));
  }
View Full Code Here

  @Test
  public void usesConfiguredFileRepository() throws Exception {
    UpdateSystem updateSystem = ConfiguredUpdateSystem.loadProperties().create();
    Version latestVersion = getUpdaterThatHasRun(updateSystem).getLatestVersion();
    assertThat(latestVersion, is(sameVersionAs(new NumericVersion(4, 2, 1))));
  }
View Full Code Here

TOP

Related Classes of de.idos.updates.NumericVersion

Copyright © 2018 www.massapicom. 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.