Search in sources :

Example 1 with DetectArgumentState

use of com.synopsys.integration.detect.configuration.help.DetectArgumentState in project synopsys-detect by blackducksoftware.

the class AirGapParsedValueTests method fullAirGap.

@Test
public void fullAirGap() {
    String[] args = new String[] { "-z", "FULL" };
    DetectArgumentState state = parser.parseArgs(args);
    AirGapType type = new AirGapTypeDecider().decide(state);
    Assertions.assertEquals(AirGapType.FULL, type);
}
Also used : DetectArgumentState(com.synopsys.integration.detect.configuration.help.DetectArgumentState) AirGapType(com.synopsys.integration.detect.workflow.airgap.AirGapType) AirGapTypeDecider(com.synopsys.integration.detect.workflow.airgap.AirGapTypeDecider) Test(org.junit.jupiter.api.Test)

Example 2 with DetectArgumentState

use of com.synopsys.integration.detect.configuration.help.DetectArgumentState in project synopsys-detect by blackducksoftware.

the class AirGapParsedValueTests method noDocker.

@Test
public void noDocker() {
    String[] args = new String[] { "-z", "NO_DOCKER" };
    DetectArgumentState state = parser.parseArgs(args);
    AirGapType type = new AirGapTypeDecider().decide(state);
    Assertions.assertEquals(AirGapType.NO_DOCKER, type);
}
Also used : DetectArgumentState(com.synopsys.integration.detect.configuration.help.DetectArgumentState) AirGapType(com.synopsys.integration.detect.workflow.airgap.AirGapType) AirGapTypeDecider(com.synopsys.integration.detect.workflow.airgap.AirGapTypeDecider) Test(org.junit.jupiter.api.Test)

Example 3 with DetectArgumentState

use of com.synopsys.integration.detect.configuration.help.DetectArgumentState in project synopsys-detect by blackducksoftware.

the class AirGapParsedValueTests method defaultIsFull.

@Test
public void defaultIsFull() {
    String[] args = new String[] { "-z" };
    DetectArgumentState state = parser.parseArgs(args);
    AirGapType type = new AirGapTypeDecider().decide(state);
    Assertions.assertEquals(AirGapType.FULL, type);
}
Also used : DetectArgumentState(com.synopsys.integration.detect.configuration.help.DetectArgumentState) AirGapType(com.synopsys.integration.detect.workflow.airgap.AirGapType) AirGapTypeDecider(com.synopsys.integration.detect.workflow.airgap.AirGapTypeDecider) Test(org.junit.jupiter.api.Test)

Example 4 with DetectArgumentState

use of com.synopsys.integration.detect.configuration.help.DetectArgumentState in project synopsys-detect by blackducksoftware.

the class DiagnosticDecisionTest method commandLineDecisionExtended.

@Test
void commandLineDecisionExtended() {
    PropertyConfiguration propertyConfiguration = createPropertyConfiguration(false, false);
    DetectArgumentState detectArgumentState = createDetectArgumentState(false, true);
    DiagnosticDecision diagnosticDecision = DiagnosticDecision.decide(detectArgumentState, propertyConfiguration);
    Assertions.assertTrue(diagnosticDecision.shouldCreateDiagnosticSystem());
    Assertions.assertTrue(diagnosticDecision.isExtended());
}
Also used : DetectArgumentState(com.synopsys.integration.detect.configuration.help.DetectArgumentState) PropertyConfiguration(com.synopsys.integration.configuration.config.PropertyConfiguration) Test(org.junit.jupiter.api.Test)

Example 5 with DetectArgumentState

use of com.synopsys.integration.detect.configuration.help.DetectArgumentState in project synopsys-detect by blackducksoftware.

the class DiagnosticDecisionTest method propertyDecision.

@Test
void propertyDecision() {
    PropertyConfiguration propertyConfiguration = createPropertyConfiguration(true, false);
    DetectArgumentState detectArgumentState = createDetectArgumentState(false, false);
    DiagnosticDecision diagnosticDecision = DiagnosticDecision.decide(detectArgumentState, propertyConfiguration);
    Assertions.assertTrue(diagnosticDecision.shouldCreateDiagnosticSystem());
    Assertions.assertFalse(diagnosticDecision.isExtended());
}
Also used : DetectArgumentState(com.synopsys.integration.detect.configuration.help.DetectArgumentState) PropertyConfiguration(com.synopsys.integration.configuration.config.PropertyConfiguration) Test(org.junit.jupiter.api.Test)

Aggregations

DetectArgumentState (com.synopsys.integration.detect.configuration.help.DetectArgumentState)14 Test (org.junit.jupiter.api.Test)13 PropertyConfiguration (com.synopsys.integration.configuration.config.PropertyConfiguration)5 AirGapType (com.synopsys.integration.detect.workflow.airgap.AirGapType)3 AirGapTypeDecider (com.synopsys.integration.detect.workflow.airgap.AirGapTypeDecider)3 PropertySource (com.synopsys.integration.configuration.source.PropertySource)1 SpringConfigurationPropertySource (com.synopsys.integration.configuration.source.SpringConfigurationPropertySource)1 DetectArgumentStateParser (com.synopsys.integration.detect.configuration.help.DetectArgumentStateParser)1 DetectBoot (com.synopsys.integration.detect.lifecycle.boot.DetectBoot)1 DetectBootFactory (com.synopsys.integration.detect.lifecycle.boot.DetectBootFactory)1 DetectBootResult (com.synopsys.integration.detect.lifecycle.boot.DetectBootResult)1 ArrayList (java.util.ArrayList)1