use of org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey in project herd by FINRAOS.
the class BusinessObjectDataAttributeRestControllerTest method testUpdateBusinessObjectDataAttributeSubPartitionValuesCount0.
@Test
public void testUpdateBusinessObjectDataAttributeSubPartitionValuesCount0() {
// 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, NO_SUBPARTITION_VALUES, 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, DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE, businessObjectDataAttributeUpdateRequest);
// Verify the external calls.
verify(businessObjectDataAttributeService).updateBusinessObjectDataAttribute(businessObjectDataAttributeKey, businessObjectDataAttributeUpdateRequest);
verifyNoMoreInteractionsHelper();
// Validate the results.
assertEquals(businessObjectDataAttribute, result);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey in project herd by FINRAOS.
the class BusinessObjectDataAttributeRestControllerTest method testUpdateBusinessObjectDataAttributeSubPartitionValuesCount1.
@Test
public void testUpdateBusinessObjectDataAttributeSubPartitionValuesCount1() {
// 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)), 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), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE, businessObjectDataAttributeUpdateRequest);
// Verify the external calls.
verify(businessObjectDataAttributeService).updateBusinessObjectDataAttribute(businessObjectDataAttributeKey, businessObjectDataAttributeUpdateRequest);
verifyNoMoreInteractionsHelper();
// Validate the results.
assertEquals(businessObjectDataAttribute, result);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey in project herd by FINRAOS.
the class BusinessObjectDataAttributeRestControllerTest method testGetBusinessObjectDataAttributesSubPartitionValuesCount0.
@Test
public void testGetBusinessObjectDataAttributesSubPartitionValuesCount0() {
// Create a business object data key.
BusinessObjectDataKey businessObjectDataKey = new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, NO_SUBPARTITION_VALUES, DATA_VERSION);
// Create a business object data attribute keys.
BusinessObjectDataAttributeKeys businessObjectDataAttributeKeys = new BusinessObjectDataAttributeKeys(Arrays.asList(new BusinessObjectDataAttributeKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, NO_SUBPARTITION_VALUES, DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE)));
// Mock the external calls.
when(businessObjectDataAttributeService.getBusinessObjectDataAttributes(businessObjectDataKey)).thenReturn(businessObjectDataAttributeKeys);
// Call the method under test.
BusinessObjectDataAttributeKeys result = businessObjectDataAttributeRestController.getBusinessObjectDataAttributes(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, DATA_VERSION);
// Verify the external calls.
verify(businessObjectDataAttributeService).getBusinessObjectDataAttributes(businessObjectDataKey);
verifyNoMoreInteractionsHelper();
// Validate the results.
assertEquals(businessObjectDataAttributeKeys, result);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey 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);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey in project herd by FINRAOS.
the class BusinessObjectDataAttributeRestControllerTest method testGetBusinessObjectDataAttributeSubPartitionValuesCount3.
@Test
public void testGetBusinessObjectDataAttributeSubPartitionValuesCount3() {
// 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.getBusinessObjectDataAttribute(businessObjectDataAttributeKey)).thenReturn(businessObjectDataAttribute);
// Call the method under test.
BusinessObjectDataAttribute result = businessObjectDataAttributeRestController.getBusinessObjectDataAttribute(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);
// Verify the external calls.
verify(businessObjectDataAttributeService).getBusinessObjectDataAttribute(businessObjectDataAttributeKey);
verifyNoMoreInteractionsHelper();
// Validate the results.
assertEquals(businessObjectDataAttribute, result);
}
Aggregations