Search in sources :

Example 16 with BusinessObjectDataStatusUpdateResponse

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

the class BusinessObjectDataStatusServiceTest method testUpdateBusinessObjectDataStatusLowerCaseParameters.

@Test
public void testUpdateBusinessObjectDataStatusLowerCaseParameters() {
    // Create and persist relative test entities.
    businessObjectDataDaoTestHelper.createBusinessObjectDataEntity(NAMESPACE.toUpperCase(), BDEF_NAME.toUpperCase(), FORMAT_USAGE_CODE.toUpperCase(), FORMAT_FILE_TYPE_CODE.toUpperCase(), FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, true, BDATA_STATUS.toUpperCase());
    businessObjectDataStatusDaoTestHelper.createBusinessObjectDataStatusEntity(BDATA_STATUS_2.toUpperCase());
    // Update the business object data status using lower case input parameters (except for case-sensitive partition values).
    BusinessObjectDataStatusUpdateResponse response = businessObjectDataStatusService.updateBusinessObjectDataStatus(new BusinessObjectDataKey(NAMESPACE.toLowerCase(), BDEF_NAME.toLowerCase(), FORMAT_USAGE_CODE.toLowerCase(), FORMAT_FILE_TYPE_CODE.toLowerCase(), FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION), new BusinessObjectDataStatusUpdateRequest(BDATA_STATUS_2.toLowerCase()));
    // Validate the returned object.
    businessObjectDataServiceTestHelper.validateBusinessObjectDataStatusUpdateResponse(new BusinessObjectDataKey(NAMESPACE.toUpperCase(), BDEF_NAME.toUpperCase(), FORMAT_USAGE_CODE.toUpperCase(), FORMAT_FILE_TYPE_CODE.toUpperCase(), FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION), BDATA_STATUS_2.toUpperCase(), BDATA_STATUS.toUpperCase(), response);
}
Also used : BusinessObjectDataStatusUpdateRequest(org.finra.herd.model.api.xml.BusinessObjectDataStatusUpdateRequest) BusinessObjectDataStatusUpdateResponse(org.finra.herd.model.api.xml.BusinessObjectDataStatusUpdateResponse) BusinessObjectDataKey(org.finra.herd.model.api.xml.BusinessObjectDataKey) Test(org.junit.Test)

Example 17 with BusinessObjectDataStatusUpdateResponse

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

the class BusinessObjectDataStatusServiceTest method testUpdateBusinessObjectDataStatusNoStatusChange.

@Test
public void testUpdateBusinessObjectDataStatusNoStatusChange() {
    // Create and persist relative test entities.
    businessObjectDataDaoTestHelper.createBusinessObjectDataEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, true, BDATA_STATUS);
    // Update the business object data status.
    BusinessObjectDataStatusUpdateResponse response = businessObjectDataStatusService.updateBusinessObjectDataStatus(new BusinessObjectDataKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION), new BusinessObjectDataStatusUpdateRequest(BDATA_STATUS));
    // Validate the returned object.
    businessObjectDataServiceTestHelper.validateBusinessObjectDataStatusUpdateResponse(new BusinessObjectDataKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION), BDATA_STATUS, BDATA_STATUS, response);
}
Also used : BusinessObjectDataStatusUpdateRequest(org.finra.herd.model.api.xml.BusinessObjectDataStatusUpdateRequest) BusinessObjectDataStatusUpdateResponse(org.finra.herd.model.api.xml.BusinessObjectDataStatusUpdateResponse) BusinessObjectDataKey(org.finra.herd.model.api.xml.BusinessObjectDataKey) Test(org.junit.Test)

Aggregations

BusinessObjectDataStatusUpdateResponse (org.finra.herd.model.api.xml.BusinessObjectDataStatusUpdateResponse)17 BusinessObjectDataKey (org.finra.herd.model.api.xml.BusinessObjectDataKey)14 Test (org.junit.Test)11 BusinessObjectDataStatusUpdateRequest (org.finra.herd.model.api.xml.BusinessObjectDataStatusUpdateRequest)10 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 FieldExtension (org.activiti.bpmn.model.FieldExtension)3 Parameter (org.finra.herd.model.api.xml.Parameter)3 StringWriter (java.io.StringWriter)1 JAXBContext (javax.xml.bind.JAXBContext)1 Marshaller (javax.xml.bind.Marshaller)1 HttpPut (org.apache.http.client.methods.HttpPut)1 URIBuilder (org.apache.http.client.utils.URIBuilder)1 StringEntity (org.apache.http.entity.StringEntity)1 CloseableHttpClient (org.apache.http.impl.client.CloseableHttpClient)1 BusinessObjectDataEntity (org.finra.herd.model.jpa.BusinessObjectDataEntity)1 Secured (org.springframework.security.access.annotation.Secured)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1