DefaultComponentMetadataProducer implements ComponentMetadataProducer { protected boolean isPrerelease(final Component component, final Iterable<Asset> assets) { return false; } @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; }
@Test public void defaultIsPrereleaseWhenUsingRelease() throws Exception { Bucket bucket = createBucket(REPO_NAME); Component component = createDetachedComponent(bucket, GROUP, NAME, VERSION); assertFalse(underTest.isPrerelease(component, emptyList())); }
@Test public void defaultIsPreReleaseWhenUsingPrerelease() throws Exception { Bucket bucket = createBucket(REPO_NAME); Component component = createDetachedComponent(bucket, GROUP, NAME, VERSION + "-SNAPSHOT"); assertFalse(underTest.isPrerelease(component, emptyList())); }