Search in sources :

Example 31 with S3PropertiesLocation

use of org.finra.herd.model.api.xml.S3PropertiesLocation in project herd by FINRAOS.

the class S3PropertiesLocationHelperTest method testValidateWhenBucketNameIsBlankThrowsError.

/**
 * validate() throws an IllegalArgumentException when bucket name is blank.
 */
@Test
public void testValidateWhenBucketNameIsBlankThrowsError() {
    S3PropertiesLocation s3PropertiesLocation = getS3PropertiesLocation();
    s3PropertiesLocation.setBucketName(BLANK_TEXT);
    testValidateThrowsError(s3PropertiesLocation, IllegalArgumentException.class, "S3 properties location bucket name must be specified.");
}
Also used : S3PropertiesLocation(org.finra.herd.model.api.xml.S3PropertiesLocation) Test(org.junit.Test) AbstractServiceTest(org.finra.herd.service.AbstractServiceTest)

Example 32 with S3PropertiesLocation

use of org.finra.herd.model.api.xml.S3PropertiesLocation in project herd by FINRAOS.

the class S3PropertiesLocationHelperTest method testValidateWhenObjectKeyIsBlankThrowsError.

/**
 * validate() throws an IllegalArgumentException when key is blank.
 */
@Test
public void testValidateWhenObjectKeyIsBlankThrowsError() {
    S3PropertiesLocation s3PropertiesLocation = getS3PropertiesLocation();
    s3PropertiesLocation.setKey(BLANK_TEXT);
    testValidateThrowsError(s3PropertiesLocation, IllegalArgumentException.class, "S3 properties location object key must be specified.");
}
Also used : S3PropertiesLocation(org.finra.herd.model.api.xml.S3PropertiesLocation) Test(org.junit.Test) AbstractServiceTest(org.finra.herd.service.AbstractServiceTest)

Example 33 with S3PropertiesLocation

use of org.finra.herd.model.api.xml.S3PropertiesLocation in project herd by FINRAOS.

the class S3PropertiesLocationHelperTest method getS3PropertiesLocation.

/**
 * Creates a new {@link S3PropertiesLocation} with bucket name and key.
 *
 * @return {@link S3PropertiesLocation}
 */
private S3PropertiesLocation getS3PropertiesLocation() {
    S3PropertiesLocation s3PropertiesLocation = new S3PropertiesLocation();
    s3PropertiesLocation.setBucketName("testBucketName");
    s3PropertiesLocation.setKey("testKey");
    return s3PropertiesLocation;
}
Also used : S3PropertiesLocation(org.finra.herd.model.api.xml.S3PropertiesLocation)

Aggregations

S3PropertiesLocation (org.finra.herd.model.api.xml.S3PropertiesLocation)33 Test (org.junit.Test)26 Parameter (org.finra.herd.model.api.xml.Parameter)13 Job (org.finra.herd.model.api.xml.Job)7 JdbcExecutionRequest (org.finra.herd.model.api.xml.JdbcExecutionRequest)6 ObjectNotFoundException (org.finra.herd.model.ObjectNotFoundException)5 AccessDeniedException (org.springframework.security.access.AccessDeniedException)5 JobDefinition (org.finra.herd.model.api.xml.JobDefinition)4 JdbcExecutionResponse (org.finra.herd.model.api.xml.JdbcExecutionResponse)3 JobDefinitionCreateRequest (org.finra.herd.model.api.xml.JobDefinitionCreateRequest)3 JobSignalRequest (org.finra.herd.model.api.xml.JobSignalRequest)3 JobDefinitionEntity (org.finra.herd.model.jpa.JobDefinitionEntity)3 AbstractServiceTest (org.finra.herd.service.AbstractServiceTest)3 HashMap (java.util.HashMap)2 JdbcStatement (org.finra.herd.model.api.xml.JdbcStatement)2 JobDefinitionUpdateRequest (org.finra.herd.model.api.xml.JobDefinitionUpdateRequest)2 JobDefinitionParameterEntity (org.finra.herd.model.jpa.JobDefinitionParameterEntity)2 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1 DataSource (javax.sql.DataSource)1