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);
}
Aggregations