@Test public void testCreateUpdaterImpl() { SW360ConnectionConfigurationFactory connectionFactory = mock(SW360ConnectionConfigurationFactory.class); SW360Connection connection = mock(SW360Connection.class); when(connectionFactory.createConnection(any(), any(), any())).thenReturn(connection); SW360Updater updater = new SW360Updater(connectionFactory); updater.setAntennaContext(antennaContextMock); SW360UpdaterImpl updaterImpl = updater.createUpdaterImpl(createConfigMap()); assertThat(updaterImpl.isUpdateReleases()).isTrue(); assertThat(updaterImpl.isUploadSources()).isTrue(); assertThat(updaterImpl.isDeleteObsoleteSourceAttachments()).isTrue(); }
SW360UpdaterImpl createUpdaterImpl(Map<String, String> configMap) { SW360Connection sw360Connection = getConnectionFactory().createConnection(key -> getConfigValue(key, configMap), context.getHttpClient(), context.getObjectMapper()); SW360MetaDataUpdater sw360MetaDataUpdater = new SW360MetaDataUpdater(sw360Connection); return new SW360UpdaterImpl(sw360MetaDataUpdater, getProjectName(), getProjectVersion(), getBooleanConfigValue(UPDATE_RELEASES, configMap), getBooleanConfigValue(UPLOAD_SOURCES, configMap), getBooleanConfigValue(DELETE_OBSOLETE_SOURCES, configMap)); }
SW360Updater extends AbstractGenerator { SW360UpdaterImpl createUpdaterImpl(Map<String, String> configMap) { SW360Connection sw360Connection = getConnectionFactory().createConnection(key -> getConfigValue(key, configMap), context.getHttpClient(), context.getObjectMapper()); SW360MetaDataUpdater sw360MetaDataUpdater = new SW360MetaDataUpdater(sw360Connection); return new SW360UpdaterImpl(sw360MetaDataUpdater, getProjectName(), getProjectVersion(), getBooleanConfigValue(UPDATE_RELEASES, configMap), getBooleanConfigValue(UPLOAD_SOURCES, configMap), getBooleanConfigValue(DELETE_OBSOLETE_SOURCES, configMap)); } }
SW360Updater extends AbstractGenerator { SW360UpdaterImpl createUpdaterImpl(Map<String, String> configMap) { SW360Connection sw360Connection = getConnectionFactory().createConnection(key -> getConfigValue(key, configMap), context.getHttpClient(), context.getObjectMapper()); SW360MetaDataUpdater sw360MetaDataUpdater = new SW360MetaDataUpdater(sw360Connection); return new SW360UpdaterImpl(sw360MetaDataUpdater, getProjectName(), getProjectVersion(), getBooleanConfigValue(UPDATE_RELEASES, configMap), getBooleanConfigValue(UPLOAD_SOURCES, configMap), getBooleanConfigValue(DELETE_OBSOLETE_SOURCES, configMap)); } SW360Updater();   SW360Updater(SW360ConnectionConfigurationFactory factory); }
SW360Updater extends AbstractGenerator { SW360UpdaterImpl createUpdaterImpl(Map<String, String> configMap) { SW360Connection sw360Connection = getConnectionFactory().createConnection(key -> getConfigValue(key, configMap), context.getHttpClient(), context.getObjectMapper()); SW360MetaDataUpdater sw360MetaDataUpdater = new SW360MetaDataUpdater(sw360Connection); return new SW360UpdaterImpl(sw360MetaDataUpdater, getProjectName(), getProjectVersion(), getBooleanConfigValue(UPDATE_RELEASES, configMap), getBooleanConfigValue(UPLOAD_SOURCES, configMap), getBooleanConfigValue(DELETE_OBSOLETE_SOURCES, configMap)); } SW360Updater();   SW360Updater(SW360ConnectionConfigurationFactory factory); @Override void configure(Map<String, String> configMap); @Override Map<String, IAttachable> produce(Collection<Artifact> intermediates); }
SW360Updater extends AbstractGenerator { SW360UpdaterImpl createUpdaterImpl(Map<String, String> configMap) { SW360Connection sw360Connection = getConnectionFactory().createConnection(key -> getConfigValue(key, configMap), context.getHttpClient(), context.getObjectMapper()); SW360MetaDataUpdater sw360MetaDataUpdater = new SW360MetaDataUpdater(sw360Connection); return new SW360UpdaterImpl(sw360MetaDataUpdater, getProjectName(), getProjectVersion(), getBooleanConfigValue(UPDATE_RELEASES, configMap), getBooleanConfigValue(UPLOAD_SOURCES, configMap), getBooleanConfigValue(DELETE_OBSOLETE_SOURCES, configMap)); } SW360Updater();   SW360Updater(SW360ConnectionConfigurationFactory factory); @Override void configure(Map<String, String> configMap); @Override Map<String, IAttachable> produce(Collection<Artifact> intermediates);  }