Search in sources :

Example 1 with AnalyticsConfigurationService

use of com.synopsys.integration.detect.workflow.blackduck.analytics.AnalyticsConfigurationService in project synopsys-detect by blackducksoftware.

the class ProductBootTest method testBoot.

private ProductRunData testBoot(BlackDuckDecision blackDuckDecision, ProductBootOptions productBootOptions, BlackDuckConnectivityResult blackDuckconnectivityResult) throws DetectUserFriendlyException, IOException, IntegrationException {
    ProductBootFactory productBootFactory = Mockito.mock(ProductBootFactory.class);
    Mockito.when(productBootFactory.createPhoneHomeManager(Mockito.any())).thenReturn(null);
    BlackDuckConnectivityChecker blackDuckConnectivityChecker = Mockito.mock(BlackDuckConnectivityChecker.class);
    Mockito.when(blackDuckConnectivityChecker.determineConnectivity(Mockito.any())).thenReturn(blackDuckconnectivityResult);
    AnalyticsConfigurationService analyticsConfigurationService = Mockito.mock(AnalyticsConfigurationService.class);
    Mockito.when(analyticsConfigurationService.fetchAnalyticsSetting(Mockito.any(), Mockito.any())).thenReturn(new AnalyticsSetting("analytics", true));
    ProductBoot productBoot = new ProductBoot(blackDuckConnectivityChecker, analyticsConfigurationService, productBootFactory, productBootOptions);
    return productBoot.boot(blackDuckDecision, null);
}
Also used : AnalyticsSetting(com.synopsys.integration.detect.workflow.blackduck.analytics.AnalyticsSetting) AnalyticsConfigurationService(com.synopsys.integration.detect.workflow.blackduck.analytics.AnalyticsConfigurationService) ProductBootFactory(com.synopsys.integration.detect.lifecycle.boot.product.ProductBootFactory) BlackDuckConnectivityChecker(com.synopsys.integration.detect.lifecycle.boot.product.BlackDuckConnectivityChecker) ProductBoot(com.synopsys.integration.detect.lifecycle.boot.product.ProductBoot)

Aggregations

BlackDuckConnectivityChecker (com.synopsys.integration.detect.lifecycle.boot.product.BlackDuckConnectivityChecker)1 ProductBoot (com.synopsys.integration.detect.lifecycle.boot.product.ProductBoot)1 ProductBootFactory (com.synopsys.integration.detect.lifecycle.boot.product.ProductBootFactory)1 AnalyticsConfigurationService (com.synopsys.integration.detect.workflow.blackduck.analytics.AnalyticsConfigurationService)1 AnalyticsSetting (com.synopsys.integration.detect.workflow.blackduck.analytics.AnalyticsSetting)1