use of org.finra.herd.model.api.xml.AttributeValueList in project herd by FINRAOS.
the class AttributeValueListRestControllerTest method testDeleteAttributeValueList.
@Test
public void testDeleteAttributeValueList() {
// Create an attribute value list key.
AttributeValueListKey attributeValueListKey = new AttributeValueListKey(ATTRIBUTE_VALUE_LIST_NAMESPACE, ATTRIBUTE_VALUE_LIST_NAME);
// Create an attribute value list.
AttributeValueList attributeValueList = new AttributeValueList(ATTRIBUTE_VALUE_LIST_ID, attributeValueListKey);
// Mock calls to external methods.
when(attributeValueListService.deleteAttributeValueList(attributeValueListKey)).thenReturn(attributeValueList);
// Call the method under test.
AttributeValueList result = attributeValueListRestController.deleteAttributeValueList(ATTRIBUTE_VALUE_LIST_NAMESPACE, ATTRIBUTE_VALUE_LIST_NAME);
// Verify the external calls.
verify(attributeValueListService).deleteAttributeValueList(attributeValueListKey);
verifyNoMoreInteractions(attributeValueListService);
// Validate the result.
assertEquals(attributeValueList, result);
}
use of org.finra.herd.model.api.xml.AttributeValueList in project herd by FINRAOS.
the class AttributeValueListRestControllerTest method testGetAttributeValueList.
@Test
public void testGetAttributeValueList() {
// Create an attribute value list key.
AttributeValueListKey attributeValueListKey = new AttributeValueListKey(ATTRIBUTE_VALUE_LIST_NAMESPACE, ATTRIBUTE_VALUE_LIST_NAME);
// Create an attribute value list.
AttributeValueList attributeValueList = new AttributeValueList(ATTRIBUTE_VALUE_LIST_ID, attributeValueListKey);
// Mock calls to external methods.
when(attributeValueListService.getAttributeValueList(attributeValueListKey)).thenReturn(attributeValueList);
// Call the method under test.
AttributeValueList result = attributeValueListRestController.getAttributeValueList(ATTRIBUTE_VALUE_LIST_NAMESPACE, ATTRIBUTE_VALUE_LIST_NAME);
// Verify the external calls.
verify(attributeValueListService).getAttributeValueList(attributeValueListKey);
verifyNoMoreInteractions(attributeValueListService);
// Validate the result.
assertEquals(attributeValueList, result);
}
Aggregations