agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/managers/JobRequestParameterProcessorIT.java
/**
     * Generates test cases for each {@link SoftwareParameterType} to test that a non-null custom value for the
     * parameter is set by {@link JobRequestParameterProcessor#process(Map).}.
     *
     * @return test cases
     */
Generates test cases for each  SoftwareParameterType to test that a non-null custom value for the
parameter is set by  JobRequestParameterProcessor#process(Map)

@return test cases
Generates test cases for each SoftwareParameterType to test that a non - null custom value for the parameter is set by JobRequestParameterProcessor#process ( Map ) @return test cases
@DataProvider
    public Object[][] customValueParameterProvider() {
        List<Object[]> testData = new ArrayList<Object[]>();
        String parameterName = "testparam";
        testData.add(new Object[]{SoftwareParameterType.flag, Boolean.TRUE, mapper.createObjectNode().put(parameterName, Boolean.FALSE)});
        testData.add(new Object[]{SoftwareParameterType.flag, Boolean.FALSE, mapper.createObjectNode().put(parameterName, Boolean.TRUE)});
        testData.add(new Object[]{SoftwareParameterType.bool, Boolean.TRUE, mapper.createObjectNode().put(parameterName, Boolean.FALSE)});
        testData.add(new Object[]{SoftwareParameterType.bool, Boolean.FALSE, mapper.createObjectNode().put(parameterName, Boolean.TRUE)});
        testData.add(new Object[]{SoftwareParameterType.enumeration, "ALPHA", mapper.createObjectNode().put(parameterName, "ALPHA")});
        testData.add(new Object[]{SoftwareParameterType.enumeration, "ALPHA", mapper.createObjectNode().put(parameterName, "BETA")});
        testData.add(new Object[]{SoftwareParameterType.enumeration, "ALPHA", mapper.createObjectNode().put(parameterName, "GAMMA")});
        testData.add(new Object[]{SoftwareParameterType.enumeration, "ALPHA", mapper.createObjectNode().put(parameterName, "DELTA")});
        testData.add(new Object[]{SoftwareParameterType.number, 512L, mapper.createObjectNode().put(parameterName, -1)});
        testData.add(new Object[]{SoftwareParameterType.number, 512L, mapper.createObjectNode().put(parameterName, 225L)});
        testData.add(new Object[]{SoftwareParameterType.number, -1, mapper.createObjectNode().put(parameterName, 0L)});
        testData.add(new Object[]{SoftwareParameterType.string, UUID.randomUUID().toString(), mapper.createObjectNode().put(parameterName, UUID.randomUUID().toString())});
        testData.add(new Object[]{SoftwareParameterType.string, UUID.randomUUID().toString(), mapper.createObjectNode().put(parameterName, "null")});
        testData.add(new Object[]{SoftwareParameterType.string, UUID.randomUUID().toString(), mapper.createObjectNode().put(parameterName, "   ")});
        testData.add(new Object[]{SoftwareParameterType.string, UUID.randomUUID().toString(), mapper.createObjectNode().put(parameterName, "")});
        return testData.toArray(new Object[][]{});
    }
@ DataProvider public Object [ ] [ ] customValueParameterProvider ( ) { List < Object [ ] > testData = new ArrayList < Object [ ] > ( ) ; String parameterName = "testparam" ; testData . add ( new Object [ ] { SoftwareParameterType . flag , Boolean . TRUE , mapper . createObjectNode ( ) . put ( parameterName , Boolean . FALSE ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . flag , Boolean . FALSE , mapper . createObjectNode ( ) . put ( parameterName , Boolean . TRUE ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . bool , Boolean . TRUE , mapper . createObjectNode ( ) . put ( parameterName , Boolean . FALSE ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . bool , Boolean . FALSE , mapper . createObjectNode ( ) . put ( parameterName , Boolean . TRUE ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . enumeration , "ALPHA" , mapper . createObjectNode ( ) . put ( parameterName , "ALPHA" ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . enumeration , "ALPHA" , mapper . createObjectNode ( ) . put ( parameterName , "BETA" ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . enumeration , "ALPHA" , mapper . createObjectNode ( ) . put ( parameterName , "GAMMA" ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . enumeration , "ALPHA" , mapper . createObjectNode ( ) . put ( parameterName , "DELTA" ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . number , 512L , mapper . createObjectNode ( ) . put ( parameterName , - 1 ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . number , 512L , mapper . createObjectNode ( ) . put ( parameterName , 225L ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . number , - 1 , mapper . createObjectNode ( ) . put ( parameterName , 0L ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . string , UUID . randomUUID ( ) . toString ( ) , mapper . createObjectNode ( ) . put ( parameterName , UUID . randomUUID ( ) . toString ( ) ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . string , UUID . randomUUID ( ) . toString ( ) , mapper . createObjectNode ( ) . put ( parameterName , "null" ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . string , UUID . randomUUID ( ) . toString ( ) , mapper . createObjectNode ( ) . put ( parameterName , "   " ) } ) ; testData . add ( new Object [ ] { SoftwareParameterType . string , UUID . randomUUID ( ) . toString ( ) , mapper . createObjectNode ( ) . put ( parameterName , "" ) } ) ; return testData . toArray ( new Object [ ] [ ] { } ) ; }
Generates test cases for each {@link SoftwareParameterType} to test that a non-null custom value for the
 parameter is set by {@link JobRequestParameterProcessor#process(Map).
Generates test cases for each { @link SoftwareParameterType } to test that a non - null custom value for the parameter is set by { @link JobRequestParameterProcessor#process ( Map ) .