@Test public void defaultLastBlobUpdatedWithNoAssetsToNoDate() throws Exception { DateTime expected = new DateTime(); Bucket bucket = createBucket(REPO_NAME); Component component = createDetachedComponent(bucket, GROUP, NAME, VERSION) .lastUpdated(expected.plusMillis(1)); assertThat(underTest.lastBlobUpdated(emptyList()).isPresent(), is(false)); }
@VisibleForTesting public Optional<DateTime> lastBlobUpdated(final Iterable<Asset> assets) { return getDateTime(assets, Asset::blobUpdated); }
DefaultComponentMetadataProducer implements ComponentMetadataProducer { @VisibleForTesting public Optional<DateTime> lastBlobUpdated(final Iterable<Asset> assets) { return getDateTime(assets, Asset::blobUpdated); } }
DefaultComponentMetadataProducer implements ComponentMetadataProducer { @VisibleForTesting public Optional<DateTime> lastBlobUpdated(final Iterable<Asset> assets) { return getDateTime(assets, Asset::blobUpdated); } @Inject  DefaultComponentMetadataProducer(final Set<ComponentMetadataProducerExtension> componentMetadataProducerExtensions); }
DefaultComponentMetadataProducer implements ComponentMetadataProducer { @VisibleForTesting public Optional<DateTime> lastBlobUpdated(final Iterable<Asset> assets) { return getDateTime(assets, Asset::blobUpdated); } @Inject  DefaultComponentMetadataProducer(final Set<ComponentMetadataProducerExtension> componentMetadataProducerExtensions); @Override String getMetadata(final Component component,
                            final Iterable<Asset> assets,
                            final Map<String, Object> additional); @VisibleForTesting Optional<DateTime> lastDownloaded(final Iterable<Asset> assets); @VisibleForTesting Optional<DateTime> lastBlobUpdated(final Iterable<Asset> assets); String getNormalizedVersion(Component component); }
DefaultComponentMetadataProducer implements ComponentMetadataProducer { @VisibleForTesting public Optional<DateTime> lastBlobUpdated(final Iterable<Asset> assets) { return getDateTime(assets, Asset::blobUpdated); } @Inject  DefaultComponentMetadataProducer(final Set<ComponentMetadataProducerExtension> componentMetadataProducerExtensions); @Override String getMetadata(final Component component,
                            final Iterable<Asset> assets,
                            final Map<String, Object> additional); @VisibleForTesting Optional<DateTime> lastDownloaded(final Iterable<Asset> assets); @VisibleForTesting Optional<DateTime> lastBlobUpdated(final Iterable<Asset> assets); String getNormalizedVersion(Component component); static final String ATTRIBUTES; static final String CONTENT_TYPE; static final String FORMAT; static final String NAME; static final String GROUP; static final String REPOSITORY_NAME; static final String VERSION; static final String NORMALIZED_VERSION; static final String ASSETS; static final String ID; static final String IS_PRERELEASE_KEY; static final String LAST_BLOB_UPDATED_KEY; static final String LAST_DOWNLOADED_KEY; static final String REGEX_KEY; }