Package de.idos.updates.store

Examples of de.idos.updates.store.ProgressReport


    verify(versionStore, atLeastOnce()).reportAllProgressTo(Mockito.isA(ProgressReport.class));
  }

  @Test
  public void reportsToAnyNumberOfListeners() throws Exception {
    ProgressReport firstReport = mock(ProgressReport.class);
    ProgressReport secondReport = mock(ProgressReport.class);
    updateSystem.reportAllProgressTo(firstReport);
    updateSystem.reportAllProgressTo(secondReport);
    Updater updater = updateSystem.checkForUpdates();
    updater.runCheck();
    verify(firstReport).lookingUpLatestAvailableVersion();
View Full Code Here


    verify(secondReport).lookingUpLatestAvailableVersion();
  }

  @Test
  public void doesNotReportToRemovedListener() throws Exception {
    ProgressReport firstReport = mock(ProgressReport.class);
    updateSystem.reportAllProgressTo(firstReport);
    updateSystem.stopReportingTo(firstReport);
    updateSystem.checkForUpdates();
    verifyZeroInteractions(firstReport);
  }
View Full Code Here

                             VersionDiscovery availableDiscovery, VersionTransfer transfer) {
    this.availableDiscovery = availableDiscovery;
    this.installedDiscovery = installedDiscovery;
    this.transfer = transfer;
    this.receptacle = receptacle;
    ProgressReport announcingReport = progressAnnouncer.announce();
    installedDiscovery.reportAllProgressTo(announcingReport);
    availableDiscovery.reportAllProgressTo(announcingReport);
    transfer.reportAllProgressTo(announcingReport);
    receptacle.reportAllProgressTo(announcingReport);
  }
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  @Test
  public void createsDefaultInstallerForConvenience() throws Exception {
    ProgressReport report = mock(ProgressReport.class);
    InstallationStrategy strategy = mock(InstallationStrategy.class);
    ThreadedInstaller.PrepareInstallation(strategy, report).install(version);
    Thread.sleep(10);
    verify(report).startingInstallationOf(version);
  }
View Full Code Here

public class AnnouncerTest {

    @Test
    public void allowsAdditionOfListenersAfterAnnouncementStarted() throws Exception {
        ProgressReport report = mock(ProgressReport.class);
        Announcer<ProgressReport> announcer = Announcer.to(ProgressReport.class);
        ProgressReport proxyReport = announcer.announce();
        announcer.addListener(report);
        proxyReport.updateAlreadyInProgress();
        verify(report).updateAlreadyInProgress();
    }
View Full Code Here

    NumericVersion version = new NumericVersion(4, 2, 1);
    CountDownLatch latch = new CountDownLatch(1);
    Installation installation = new SlowInstallation(new NullInstallation(), latch);
    when(store.beginInstallation(version)).thenReturn(installation);
    FilesystemRepository repository = new FilesystemRepository(folder.getRoot());
    ProgressReport report = mock(ProgressReport.class);
    repository.reportAllProgressTo(report);
    repository.transferVersionTo(version, store);
    verify(report, never()).finishedInstallation();
  }
View Full Code Here

    assertThat(discovery.getLatestVersion(), is(original));
  }

  @Test
  public void forwardsReportingToWrapped() throws Exception {
    ProgressReport report = mock(ProgressReport.class);
    discovery.reportAllProgressTo(report);
    verify(wrapped).reportAllProgressTo(report);
  }
View Full Code Here

        assertThat(store.getLatestVersion(), is(version));
    }

    @Test
    public void forwardsReportingToWrappedStore() throws Exception {
        ProgressReport report = mock(ProgressReport.class);
        store.reportAllProgressTo(report);
        verify(wrapped).reportAllProgressTo(report);
    }
View Full Code Here

TOP

Related Classes of de.idos.updates.store.ProgressReport

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.