Search in sources :

Example 6 with BusinessObjectDataAttributeUpdateRequest

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

the class BusinessObjectDataAttributeRestControllerTest method testUpdateBusinessObjectDataAttributeSubPartitionValuesCount2.

@Test
public void testUpdateBusinessObjectDataAttributeSubPartitionValuesCount2() {
    // Create a business object data update request.
    BusinessObjectDataAttributeUpdateRequest businessObjectDataAttributeUpdateRequest = new BusinessObjectDataAttributeUpdateRequest(ATTRIBUTE_VALUE_1);
    // Create a business object data attribute key.
    BusinessObjectDataAttributeKey businessObjectDataAttributeKey = new BusinessObjectDataAttributeKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, Arrays.asList(SUBPARTITION_VALUES.get(0), SUBPARTITION_VALUES.get(1)), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE);
    // Create a business object data attribute.
    BusinessObjectDataAttribute businessObjectDataAttribute = new BusinessObjectDataAttribute(ID, businessObjectDataAttributeKey, ATTRIBUTE_VALUE_1);
    // Mock the external calls.
    when(businessObjectDataAttributeService.updateBusinessObjectDataAttribute(businessObjectDataAttributeKey, businessObjectDataAttributeUpdateRequest)).thenReturn(businessObjectDataAttribute);
    // Call the method under test.
    BusinessObjectDataAttribute result = businessObjectDataAttributeRestController.updateBusinessObjectDataAttribute(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES.get(0), SUBPARTITION_VALUES.get(1), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE, businessObjectDataAttributeUpdateRequest);
    // Verify the external calls.
    verify(businessObjectDataAttributeService).updateBusinessObjectDataAttribute(businessObjectDataAttributeKey, businessObjectDataAttributeUpdateRequest);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(businessObjectDataAttribute, result);
}
Also used : BusinessObjectDataAttribute(org.finra.herd.model.api.xml.BusinessObjectDataAttribute) BusinessObjectDataAttributeUpdateRequest(org.finra.herd.model.api.xml.BusinessObjectDataAttributeUpdateRequest) BusinessObjectDataAttributeKey(org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey) Test(org.junit.Test)

Example 7 with BusinessObjectDataAttributeUpdateRequest

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

the class BusinessObjectDataAttributeRestControllerTest method testUpdateBusinessObjectDataAttributeSubPartitionValuesCount3.

@Test
public void testUpdateBusinessObjectDataAttributeSubPartitionValuesCount3() {
    // Create a business object data update request.
    BusinessObjectDataAttributeUpdateRequest businessObjectDataAttributeUpdateRequest = new BusinessObjectDataAttributeUpdateRequest(ATTRIBUTE_VALUE_1);
    // Create a business object data attribute key.
    BusinessObjectDataAttributeKey businessObjectDataAttributeKey = new BusinessObjectDataAttributeKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, Arrays.asList(SUBPARTITION_VALUES.get(0), SUBPARTITION_VALUES.get(1), SUBPARTITION_VALUES.get(2)), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE);
    // Create a business object data attribute.
    BusinessObjectDataAttribute businessObjectDataAttribute = new BusinessObjectDataAttribute(ID, businessObjectDataAttributeKey, ATTRIBUTE_VALUE_1);
    // Mock the external calls.
    when(businessObjectDataAttributeService.updateBusinessObjectDataAttribute(businessObjectDataAttributeKey, businessObjectDataAttributeUpdateRequest)).thenReturn(businessObjectDataAttribute);
    // Call the method under test.
    BusinessObjectDataAttribute result = businessObjectDataAttributeRestController.updateBusinessObjectDataAttribute(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES.get(0), SUBPARTITION_VALUES.get(1), SUBPARTITION_VALUES.get(2), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE, businessObjectDataAttributeUpdateRequest);
    // Verify the external calls.
    verify(businessObjectDataAttributeService).updateBusinessObjectDataAttribute(businessObjectDataAttributeKey, businessObjectDataAttributeUpdateRequest);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(businessObjectDataAttribute, result);
}
Also used : BusinessObjectDataAttribute(org.finra.herd.model.api.xml.BusinessObjectDataAttribute) BusinessObjectDataAttributeUpdateRequest(org.finra.herd.model.api.xml.BusinessObjectDataAttributeUpdateRequest) BusinessObjectDataAttributeKey(org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey) Test(org.junit.Test)

Example 8 with BusinessObjectDataAttributeUpdateRequest

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

the class BusinessObjectDataAttributeRestControllerTest method testUpdateBusinessObjectDataAttributeSubPartitionValuesCount4.

@Test
public void testUpdateBusinessObjectDataAttributeSubPartitionValuesCount4() {
    // Create a business object data update request.
    BusinessObjectDataAttributeUpdateRequest businessObjectDataAttributeUpdateRequest = new BusinessObjectDataAttributeUpdateRequest(ATTRIBUTE_VALUE_1);
    // Create a business object data attribute key.
    BusinessObjectDataAttributeKey businessObjectDataAttributeKey = new BusinessObjectDataAttributeKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, Arrays.asList(SUBPARTITION_VALUES.get(0), SUBPARTITION_VALUES.get(1), SUBPARTITION_VALUES.get(2), SUBPARTITION_VALUES.get(3)), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE);
    // Create a business object data attribute.
    BusinessObjectDataAttribute businessObjectDataAttribute = new BusinessObjectDataAttribute(ID, businessObjectDataAttributeKey, ATTRIBUTE_VALUE_1);
    // Mock the external calls.
    when(businessObjectDataAttributeService.updateBusinessObjectDataAttribute(businessObjectDataAttributeKey, businessObjectDataAttributeUpdateRequest)).thenReturn(businessObjectDataAttribute);
    // Call the method under test.
    BusinessObjectDataAttribute result = businessObjectDataAttributeRestController.updateBusinessObjectDataAttribute(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES.get(0), SUBPARTITION_VALUES.get(1), SUBPARTITION_VALUES.get(2), SUBPARTITION_VALUES.get(3), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE, businessObjectDataAttributeUpdateRequest);
    // Verify the external calls.
    verify(businessObjectDataAttributeService).updateBusinessObjectDataAttribute(businessObjectDataAttributeKey, businessObjectDataAttributeUpdateRequest);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(businessObjectDataAttribute, result);
}
Also used : BusinessObjectDataAttribute(org.finra.herd.model.api.xml.BusinessObjectDataAttribute) BusinessObjectDataAttributeUpdateRequest(org.finra.herd.model.api.xml.BusinessObjectDataAttributeUpdateRequest) BusinessObjectDataAttributeKey(org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey) Test(org.junit.Test)

Aggregations

BusinessObjectDataAttributeUpdateRequest (org.finra.herd.model.api.xml.BusinessObjectDataAttributeUpdateRequest)8 BusinessObjectDataAttributeKey (org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey)7 BusinessObjectDataAttribute (org.finra.herd.model.api.xml.BusinessObjectDataAttribute)6 Test (org.junit.Test)6 ObjectNotFoundException (org.finra.herd.model.ObjectNotFoundException)1 BusinessObjectDataAttributeCreateRequest (org.finra.herd.model.api.xml.BusinessObjectDataAttributeCreateRequest)1 BusinessObjectDataKey (org.finra.herd.model.api.xml.BusinessObjectDataKey)1