use of com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldRunBlackDuckOnline.
@Test
public void shouldRunBlackDuckOnline() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(false, VALID_URL);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(true, true));
Assertions.assertTrue(productDecision.shouldRun());
Assertions.assertFalse(productDecision.isOffline());
}
use of com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldNotRunBlackduckIntelligentModeAndBDIO2Disabled.
@Test
public void shouldNotRunBlackduckIntelligentModeAndBDIO2Disabled() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(false, VALID_URL);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(false, false));
Assertions.assertFalse(productDecision.shouldRun());
}
use of com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldNotRunBlackduckRapidModeAndOffline.
@Test
public void shouldNotRunBlackduckRapidModeAndOffline() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(true, VALID_URL);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.RAPID, createBdioOptions(false, true));
Assertions.assertFalse(productDecision.shouldRun());
}
use of com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldRunBlackDuckOfflineWhenOverride.
@Test
public void shouldRunBlackDuckOfflineWhenOverride() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(true, null);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
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.lifecycle.boot.decision.ProductDecider in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldRunOfflineEvenWhenUrlProvided.
@Test
public void shouldRunOfflineEvenWhenUrlProvided() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(true, "http://example.com");
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(false, true));
Assertions.assertTrue(productDecision.shouldRun());
Assertions.assertTrue(productDecision.isOffline());
}
Aggregations