Package de.idos.updates

Examples of de.idos.updates.VersionDiscovery


    assertThat(latestVersion, is(sameVersionAs(new NumericVersion(4, 2, 1))));
  }

  @Test
  public void canChangeDiscovery() throws Exception {
    VersionDiscovery discovery = mock(VersionDiscovery.class);
    NumericVersion overriddenVersion = new NumericVersion(4, 2, 2);
    when(discovery.getLatestVersion()).thenReturn(overriddenVersion);
    UpdateSystem updateSystem = ConfiguredUpdateSystem.loadProperties().butDiscoverAvailableVersionThrough(discovery).create();
    Updater updater = getUpdaterThatHasRun(updateSystem);
    Version latestVersion = updater.getLatestVersion();
    assertThat(latestVersion, is(sameVersionAs(overriddenVersion)));
  }
View Full Code Here


    this.installedVersionFallback = version;
    return this;
  }

  public UpdateSystem create() {
    VersionDiscovery installedDiscovery = store;
    if (installedVersionFallback != null) {
      if (configuration.getStrategy() == UpdateStrategy.LatestVersion) {
        installedDiscovery = new FallbackVersionDiscovery(installedDiscovery, installedVersionFallback);
      } else {
        installedDiscovery = new FixedVersionDiscovery(installedVersionFallback);
View Full Code Here

TOP

Related Classes of de.idos.updates.VersionDiscovery

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.