Search in sources :

Example 6 with ProviderDataAccessor

use of com.synopsys.integration.alert.common.persistence.accessor.ProviderDataAccessor in project hub-alert by blackducksoftware.

the class BlackDuckDistributionFieldModelTestActionTest method createProviderDataAccessor.

private ProviderDataAccessor createProviderDataAccessor() {
    ProviderDataAccessor providerDataAccessor = Mockito.mock(ProviderDataAccessor.class);
    Mockito.when(providerDataAccessor.getProjectsByProviderConfigId(Mockito.any(), Mockito.anyInt(), Mockito.anyInt(), Mockito.anyString())).thenReturn(createProviderProjects());
    createHrefsToVersionsMap().entrySet().forEach(entry -> Mockito.when(providerDataAccessor.getProjectVersionNamesByHref(1L, entry.getKey(), 0)).thenReturn(entry.getValue()));
    return providerDataAccessor;
}
Also used : ProviderDataAccessor(com.synopsys.integration.alert.common.persistence.accessor.ProviderDataAccessor)

Aggregations

ProviderDataAccessor (com.synopsys.integration.alert.common.persistence.accessor.ProviderDataAccessor)6 DistributionJobModel (com.synopsys.integration.alert.common.persistence.model.job.DistributionJobModel)3 Test (org.junit.jupiter.api.Test)3 ConfigurationModelConfigurationAccessor (com.synopsys.integration.alert.common.persistence.accessor.ConfigurationModelConfigurationAccessor)2 ProviderProject (com.synopsys.integration.alert.common.persistence.model.ProviderProject)2 ProviderSchedulingManager (com.synopsys.integration.alert.api.provider.lifecycle.ProviderSchedulingManager)1 StatefulProvider (com.synopsys.integration.alert.api.provider.state.StatefulProvider)1 TaskManager (com.synopsys.integration.alert.api.task.TaskManager)1 JobAccessor (com.synopsys.integration.alert.common.persistence.accessor.JobAccessor)1 ConfigurationFieldModel (com.synopsys.integration.alert.common.persistence.model.ConfigurationFieldModel)1 ConfigurationModel (com.synopsys.integration.alert.common.persistence.model.ConfigurationModel)1 ProviderUserModel (com.synopsys.integration.alert.common.persistence.model.ProviderUserModel)1 ConfigurationFieldModelConverter (com.synopsys.integration.alert.common.persistence.util.ConfigurationFieldModelConverter)1 FieldModel (com.synopsys.integration.alert.common.rest.model.FieldModel)1 BlackDuckProviderKey (com.synopsys.integration.alert.descriptor.api.BlackDuckProviderKey)1 BlackDuckCacheHttpClientCache (com.synopsys.integration.alert.provider.blackduck.BlackDuckCacheHttpClientCache)1 BlackDuckProperties (com.synopsys.integration.alert.provider.blackduck.BlackDuckProperties)1 BlackDuckProvider (com.synopsys.integration.alert.provider.blackduck.BlackDuckProvider)1 BlackDuckPropertiesFactory (com.synopsys.integration.alert.provider.blackduck.factory.BlackDuckPropertiesFactory)1 BlackDuckDataSyncTask (com.synopsys.integration.alert.provider.blackduck.task.BlackDuckDataSyncTask)1