agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/managers/JobRequestInputProcessorIT.java
/**
     * Tests required visible {@link SoftwareInput} allows null value when min cardinality is 0
     */
Tests required visible  SoftwareInput allows null value when min cardinality is 0
Tests required visible SoftwareInput allows null value when min cardinality is 0
@Test(dataProvider = "processRequiredVisibleParametersThrowsExceptionWhenBlankValueAndCardinalityNotZeroProvider", expectedExceptions = JobProcessingException.class)
    public void processRequiredVisibleParametersThrowsExceptionWhenBlankValueAndCardinalityNotZero(int minCardinality, int maxCardinality, ObjectNode testInputs) throws JobProcessingException {
        String message = "Null input value in job request should throw an exception when minCard = " + minCardinality + " and maxCard = " + maxCardinality;
        try {
            SoftwareInput input = createInput("hiddeninput", "http://example.com/", null, true, true);
            input.setMinCardinality(minCardinality);
            input.setMaxCardinality(maxCardinality);
            ObjectNode jobInputs = _genericProcess(List.of(input), testInputs);
            assertFalse(jobInputs.has(input.getKey()), message);
        } catch (PermissionException e) {
            fail(message, e);
        }
    }
@ Test ( dataProvider = "processRequiredVisibleParametersThrowsExceptionWhenBlankValueAndCardinalityNotZeroProvider" , expectedExceptions = JobProcessingException . class ) public void processRequiredVisibleParametersThrowsExceptionWhenBlankValueAndCardinalityNotZero ( int minCardinality , int maxCardinality , ObjectNode testInputs ) throws JobProcessingException { String message = "Null input value in job request should throw an exception when minCard = " + minCardinality + " and maxCard = " + maxCardinality ; try { SoftwareInput input = createInput ( "hiddeninput" , "http://example.com/" , null , true , true ) ; input . setMinCardinality ( minCardinality ) ; input . setMaxCardinality ( maxCardinality ) ; ObjectNode jobInputs = _genericProcess ( List . of ( input ) , testInputs ) ; assertFalse ( jobInputs . has ( input . getKey ( ) ) , message ) ; } catch ( PermissionException e ) { fail ( message , e ) ; } }
Tests required visible {@link SoftwareInput} allows null value when min cardinality is 0
Tests required visible { @link SoftwareInput } allows null value when min cardinality is 0