agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/submission/AbstractJobSubmissionTest.java
/**
	 * Generic test case for job submission tests. Tries to submit the form, asserts that an 
	 * exception was thrown if shouldThrowExceptino was true.
	 *
     * @param attribute the attribute to update
	 * @param value the value of the updated attribute
	 * @param message message if the assertion fails
	 * @param shouldThrowException true if it should fail, false otherwise
	 */
Generic test case for job submission tests. Tries to submit the form, asserts that an
exception was thrown if shouldThrowExceptino was true.

@param attribute the attribute to update
@param value the value of the updated attribute
@param message message if the assertion fails
@param shouldThrowException true if it should fail, false otherwise
Generic test case for job submission tests . Tries to submit the form asserts that an exception was thrown if shouldThrowExceptino was true . @param attribute the attribute to update @param value the value of the updated attribute @param message message if the assertion fails @param shouldThrowException true if it should fail false otherwise
protected void genericJobSubmissionTestCase(String attribute, String value, String message, boolean shouldThrowException) 
	{
		boolean actuallyThrewException = false;
		String exceptionMsg = message;
		Map<String, Object> testJobRequestMap = updateJobSubmissionForm(jobRequestMap, attribute, value);
		try
        {
        	job = JobManager.processJob(testJobRequestMap, SYSTEM_OWNER, null);
        }
        catch(JobProcessingException se)
        {
        	actuallyThrewException = true;
            exceptionMsg = "Error submitting job: " + message;
            if (actuallyThrewException != shouldThrowException) se.printStackTrace();
        }
        Assert.assertEquals(shouldThrowException, actuallyThrewException, exceptionMsg);
	}
protected void genericJobSubmissionTestCase ( String attribute , String value , String message , boolean shouldThrowException ) { boolean actuallyThrewException = false ; String exceptionMsg = message ; Map < String , Object > testJobRequestMap = updateJobSubmissionForm ( jobRequestMap , attribute , value ) ; try { job = JobManager . processJob ( testJobRequestMap , SYSTEM_OWNER , null ) ; } catch ( JobProcessingException se ) { actuallyThrewException = true ; exceptionMsg = "Error submitting job: " + message ; if ( actuallyThrewException != shouldThrowException ) se . printStackTrace ( ) ; } Assert . assertEquals ( shouldThrowException , actuallyThrewException , exceptionMsg ) ; }
Generic test case for job submission tests.
Generic test case for job submission tests .
//        System.out.println(" exception thrown?  expected " + shouldThrowException + " actual " + actuallyThrewException);