use of org.finra.herd.model.api.xml.BusinessObjectDataAttribute 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.BusinessObjectDataAttribute 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);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttribute in project herd by FINRAOS.
the class BusinessObjectDataAttributeRestControllerTest method testGetBusinessObjectDataAttributeSubPartitionValuesCount4.
@Test
public void testGetBusinessObjectDataAttributeSubPartitionValuesCount4() {
// 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.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), SUBPARTITION_VALUES.get(3), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE);
// Verify the external calls.
verify(businessObjectDataAttributeService).getBusinessObjectDataAttribute(businessObjectDataAttributeKey);
verifyNoMoreInteractionsHelper();
// Validate the results.
assertEquals(businessObjectDataAttribute, result);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttribute in project herd by FINRAOS.
the class BusinessObjectDataAttributeRestControllerTest method testDeleteBusinessObjectDataAttributeSubPartitionValuesCount4.
@Test
public void testDeleteBusinessObjectDataAttributeSubPartitionValuesCount4() {
// 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.deleteBusinessObjectDataAttribute(businessObjectDataAttributeKey)).thenReturn(businessObjectDataAttribute);
// Call the method under test.
BusinessObjectDataAttribute result = businessObjectDataAttributeRestController.deleteBusinessObjectDataAttribute(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);
// Verify the external calls.
verify(businessObjectDataAttributeService).deleteBusinessObjectDataAttribute(businessObjectDataAttributeKey);
verifyNoMoreInteractionsHelper();
// Validate the results.
assertEquals(businessObjectDataAttribute, result);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttribute 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);
}
Aggregations