use of org.finra.herd.model.api.xml.CustomDdl in project herd by FINRAOS.
the class CustomDdlServiceTest method testCreateCustomDdlTrimParameters.
@Test
public void testCreateCustomDdlTrimParameters() {
// Create and persist a business object format entity.
businessObjectFormatDaoTestHelper.createBusinessObjectFormatEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, FORMAT_DESCRIPTION, true, PARTITION_KEY);
// Create a custom DDL using input parameters with leading and trailing empty spaces.
CustomDdl resultCustomDdl = customDdlService.createCustomDdl(customDdlServiceTestHelper.createCustomDdlCreateRequest(addWhitespace(NAMESPACE), addWhitespace(BDEF_NAME), addWhitespace(FORMAT_USAGE_CODE), addWhitespace(FORMAT_FILE_TYPE_CODE), FORMAT_VERSION, addWhitespace(CUSTOM_DDL_NAME), addWhitespace(TEST_DDL)));
// Validate the returned object.
customDdlServiceTestHelper.validateCustomDdl(null, NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME, TEST_DDL, resultCustomDdl);
}
use of org.finra.herd.model.api.xml.CustomDdl in project herd by FINRAOS.
the class CustomDdlServiceTest method testUpdateCustomDdl.
@Test
public void testUpdateCustomDdl() {
// Create and persist a custom DDL entity.
CustomDdlEntity customDdlEntity = customDdlDaoTestHelper.createCustomDdlEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME, TEST_DDL);
// Update the custom DDL.
CustomDdl updatedCustomDdl = customDdlService.updateCustomDdl(new CustomDdlKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME), customDdlServiceTestHelper.createCustomDdlUpdateRequest(TEST_DDL_2));
// Validate the returned object.
customDdlServiceTestHelper.validateCustomDdl(customDdlEntity.getId(), NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME, TEST_DDL_2, updatedCustomDdl);
}
use of org.finra.herd.model.api.xml.CustomDdl in project herd by FINRAOS.
the class CustomDdlServiceTest method testUpdateCustomDdlUpperCaseParameters.
@Test
public void testUpdateCustomDdlUpperCaseParameters() {
// Create and persist a custom DDL entity using lower case values.
CustomDdlEntity customDdlEntity = customDdlDaoTestHelper.createCustomDdlEntity(NAMESPACE.toLowerCase(), BDEF_NAME.toLowerCase(), FORMAT_USAGE_CODE.toLowerCase(), FORMAT_FILE_TYPE_CODE.toLowerCase(), FORMAT_VERSION, CUSTOM_DDL_NAME.toLowerCase(), TEST_DDL.toLowerCase());
// Update the custom DDL using upper case input parameters.
CustomDdl updatedCustomDdl = customDdlService.updateCustomDdl(new CustomDdlKey(NAMESPACE.toUpperCase(), BDEF_NAME.toUpperCase(), FORMAT_USAGE_CODE.toUpperCase(), FORMAT_FILE_TYPE_CODE.toUpperCase(), FORMAT_VERSION, CUSTOM_DDL_NAME.toUpperCase()), customDdlServiceTestHelper.createCustomDdlUpdateRequest(TEST_DDL_2.toUpperCase()));
// Validate the returned object.
customDdlServiceTestHelper.validateCustomDdl(customDdlEntity.getId(), NAMESPACE.toLowerCase(), BDEF_NAME.toLowerCase(), FORMAT_USAGE_CODE.toLowerCase(), FORMAT_FILE_TYPE_CODE.toLowerCase(), FORMAT_VERSION, CUSTOM_DDL_NAME.toLowerCase(), TEST_DDL_2.toUpperCase(), updatedCustomDdl);
}
use of org.finra.herd.model.api.xml.CustomDdl in project herd by FINRAOS.
the class CustomDdlServiceTest method testGetCustomDdlTrimParameters.
@Test
public void testGetCustomDdlTrimParameters() {
// Create and persist a custom DDL entity.
CustomDdlEntity customDdlEntity = customDdlDaoTestHelper.createCustomDdlEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME, TEST_DDL);
// Retrieve the custom DDL using input parameters with leading and trailing empty spaces.
CustomDdl resultCustomDdl = customDdlService.getCustomDdl(new CustomDdlKey(addWhitespace(NAMESPACE), addWhitespace(BDEF_NAME), addWhitespace(FORMAT_USAGE_CODE), addWhitespace(FORMAT_FILE_TYPE_CODE), FORMAT_VERSION, addWhitespace(CUSTOM_DDL_NAME)));
// Validate the returned object.
customDdlServiceTestHelper.validateCustomDdl(customDdlEntity.getId(), NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME, TEST_DDL, resultCustomDdl);
}
use of org.finra.herd.model.api.xml.CustomDdl in project herd by FINRAOS.
the class CustomDdlServiceTest method testCreateCustomDdlUpperCaseParameters.
@Test
public void testCreateCustomDdlUpperCaseParameters() {
// Create and persist a business object format entity using lower case values.
businessObjectFormatDaoTestHelper.createBusinessObjectFormatEntity(NAMESPACE.toLowerCase(), BDEF_NAME.toLowerCase(), FORMAT_USAGE_CODE.toLowerCase(), FORMAT_FILE_TYPE_CODE.toLowerCase(), FORMAT_VERSION, FORMAT_DESCRIPTION.toLowerCase(), true, PARTITION_KEY.toLowerCase());
// Create a custom DDL using upper case input parameters.
CustomDdl resultCustomDdl = customDdlService.createCustomDdl(customDdlServiceTestHelper.createCustomDdlCreateRequest(NAMESPACE.toUpperCase(), BDEF_NAME.toUpperCase(), FORMAT_USAGE_CODE.toUpperCase(), FORMAT_FILE_TYPE_CODE.toUpperCase(), FORMAT_VERSION, CUSTOM_DDL_NAME.toUpperCase(), TEST_DDL.toUpperCase()));
// Validate the returned object.
customDdlServiceTestHelper.validateCustomDdl(null, NAMESPACE.toLowerCase(), BDEF_NAME.toLowerCase(), FORMAT_USAGE_CODE.toLowerCase(), FORMAT_FILE_TYPE_CODE.toLowerCase(), FORMAT_VERSION, CUSTOM_DDL_NAME.toUpperCase(), TEST_DDL.toUpperCase(), resultCustomDdl);
}
Aggregations