use of com.synopsys.integration.detect.configuration.help.DetectArgumentState in project synopsys-detect by blackducksoftware.
the class ArgumentStateParserTests method helpParsesStartValue.
@Test
public void helpParsesStartValue() {
String[] args = new String[] { "-h", "value", "--property", "--property", "--property" };
DetectArgumentState state = parser.parseArgs(args);
Assertions.assertTrue(state.isHelp());
Assertions.assertEquals("value", state.getParsedValue());
}
use of com.synopsys.integration.detect.configuration.help.DetectArgumentState in project synopsys-detect by blackducksoftware.
the class ArgumentStateParserTests method helpParsesEndValue.
@Test
public void helpParsesEndValue() {
String[] args = new String[] { "--property", "--property", "-h", "value" };
DetectArgumentState state = parser.parseArgs(args);
Assertions.assertTrue(state.isHelp());
Assertions.assertEquals("value", state.getParsedValue());
}
use of com.synopsys.integration.detect.configuration.help.DetectArgumentState in project synopsys-detect by blackducksoftware.
the class DiagnosticDecisionTest method commandLineDecision.
@Test
void commandLineDecision() {
PropertyConfiguration propertyConfiguration = createPropertyConfiguration(false, false);
DetectArgumentState detectArgumentState = createDetectArgumentState(true, false);
DiagnosticDecision diagnosticDecision = DiagnosticDecision.decide(detectArgumentState, propertyConfiguration);
Assertions.assertTrue(diagnosticDecision.shouldCreateDiagnosticSystem());
Assertions.assertFalse(diagnosticDecision.isExtended());
}
use of com.synopsys.integration.detect.configuration.help.DetectArgumentState in project synopsys-detect by blackducksoftware.
the class DiagnosticDecisionTest method noDiagnostic.
@Test
void noDiagnostic() {
PropertyConfiguration propertyConfiguration = createPropertyConfiguration(false, false);
DetectArgumentState detectArgumentState = createDetectArgumentState(false, false);
DiagnosticDecision diagnosticDecision = DiagnosticDecision.decide(detectArgumentState, propertyConfiguration);
Assertions.assertFalse(diagnosticDecision.shouldCreateDiagnosticSystem());
Assertions.assertFalse(diagnosticDecision.isExtended());
}
Aggregations