@Test public void successWhenAssetLastDownloadedIsUpdated() { when(asset.markAsDownloaded(DEFAULT_LAST_DOWNLOADED_INTERVAL)).thenReturn(true); assertThat(underTest.maybeUpdateLastDownloaded(asset), is(true)); verify(asset).markAsDownloaded(DEFAULT_LAST_DOWNLOADED_INTERVAL); }
public boolean maybeUpdateLastDownloaded(final Asset asset) { return asset.markAsDownloaded(getLastDownloadedInterval()); }
AssetManager extends ComponentSupport { public boolean maybeUpdateLastDownloaded(final Asset asset) { return asset.markAsDownloaded(getLastDownloadedInterval()); } }
AssetManager extends ComponentSupport { public boolean maybeUpdateLastDownloaded(final Asset asset) { return asset.markAsDownloaded(getLastDownloadedInterval()); } @Inject  AssetManager(final GlobalRepositorySettings globalSettings); }
AssetManager extends ComponentSupport { public boolean maybeUpdateLastDownloaded(final Asset asset) { return asset.markAsDownloaded(getLastDownloadedInterval()); } @Inject  AssetManager(final GlobalRepositorySettings globalSettings); void setLastDownloadedInterval(final Duration lastDownloadedInterval); @VisibleForTesting Duration getLastDownloadedInterval(); boolean maybeUpdateLastDownloaded(final Asset asset); }
AssetManager extends ComponentSupport { public boolean maybeUpdateLastDownloaded(final Asset asset) { return asset.markAsDownloaded(getLastDownloadedInterval()); } @Inject  AssetManager(final GlobalRepositorySettings globalSettings); void setLastDownloadedInterval(final Duration lastDownloadedInterval); @VisibleForTesting Duration getLastDownloadedInterval(); boolean maybeUpdateLastDownloaded(final Asset asset); static final Duration DEFAULT_LAST_DOWNLOADED_INTERVAL; }