agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/managers/JobRequestParameterProcessorIT.java
/**
     * Tests valid optional visible {@link SoftwareParameter} supplied in job request is accepted and used.
     */
Tests valid optional visible  SoftwareParameter supplied in job request is accepted and used.
Tests valid optional visible SoftwareParameter supplied in job request is accepted and used .
@Test(enabled = true, dataProvider = "customValueParameterProvider")
    public void processUsesValueForOptionalVisibleParameter(SoftwareParameterType type, Object defaultValue, ObjectNode customValue) {
        String message = String.format("The optional visible %s software parameter's value from the job request parameters should be set when valid and present.",
                type.name());
        try {
            SoftwareParameter param = createParameter("testparam", type, defaultValue, null, false, true);
            ObjectNode jobParameters = _genericProcess(List.of(param), param.getKey(), customValue);
            assertTrue(jobParameters.has(param.getKey()), message);
            assertEquals(jobParameters.get(param.getKey()), customValue.get(param.getKey()), message);
        } catch (JobProcessingException e) {
            fail(String.format("The optional visible %s software parameter's should not throw an exception", type.name()), e);
        } catch (IOException e) {
            fail("Error creating the software parameter to test", e);
        }
    }
@ Test ( enabled = true , dataProvider = "customValueParameterProvider" ) public void processUsesValueForOptionalVisibleParameter ( SoftwareParameterType type , Object defaultValue , ObjectNode customValue ) { String message = String . format ( "The optional visible %s software parameter's value from the job request parameters should be set when valid and present." , type . name ( ) ) ; try { SoftwareParameter param = createParameter ( "testparam" , type , defaultValue , null , false , true ) ; ObjectNode jobParameters = _genericProcess ( List . of ( param ) , param . getKey ( ) , customValue ) ; assertTrue ( jobParameters . has ( param . getKey ( ) ) , message ) ; assertEquals ( jobParameters . get ( param . getKey ( ) ) , customValue . get ( param . getKey ( ) ) , message ) ; } catch ( JobProcessingException e ) { fail ( String . format ( "The optional visible %s software parameter's should not throw an exception" , type . name ( ) ) , e ) ; } catch ( IOException e ) { fail ( "Error creating the software parameter to test" , e ) ; } }
Tests valid optional visible {@link SoftwareParameter} supplied in job request is accepted and used.
Tests valid optional visible { @link SoftwareParameter } supplied in job request is accepted and used .