use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldNotRunBlackduckURLMissing.
@Test
public void shouldNotRunBlackduckURLMissing() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(false, null);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.RAPID, createBdioOptions(true, true));
Assertions.assertFalse(productDecision.shouldRun());
}
use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldRunBlackduckLegacyEnabledAndIntelligentModeAndBDIO2Disabled.
@Test
public void shouldRunBlackduckLegacyEnabledAndIntelligentModeAndBDIO2Disabled() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(false, VALID_URL);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(false, true));
Assertions.assertTrue(productDecision.shouldRun());
}
use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldNotRunBlackDuckOfflineWhenUserProvidedHostUrl.
@Test
public void shouldNotRunBlackDuckOfflineWhenUserProvidedHostUrl() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(true, null);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(Mockito.mock(Path.class), VALID_URL);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(false, true));
Assertions.assertTrue(productDecision.shouldRun());
Assertions.assertTrue(productDecision.isOffline());
}
use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldRunBlackDuckOfflineWhenInstallPath.
@Test
public void shouldRunBlackDuckOfflineWhenInstallPath() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(true, null);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(Mockito.mock(Path.class), null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(false, true));
Assertions.assertTrue(productDecision.shouldRun());
Assertions.assertTrue(productDecision.isOffline());
}
Aggregations