Search in sources :

Example 1 with Format

use of org.onap.aaiclient.client.graphinventory.Format in project so by onap.

the class AAIQueryClientTest method testQuery.

@Test
public void testQuery() {
    List<AAIResourceUri> uris = Arrays.asList(AAIUriFactory.createResourceUri(AAIObjectType.CUSTOM_QUERY));
    Format format = Format.SIMPLE;
    CustomQuery query = new CustomQuery(uris);
    doReturn(restClient).when(client).createClient(isA(AAIResourceUri.class));
    aaiQueryClient.query(format, query);
    verify(client, times(1)).createClient(AAIUriFactory.createResourceUri(AAIObjectType.CUSTOM_QUERY).format(format));
    verify(restClient, times(1)).put(query, String.class);
}
Also used : Format(org.onap.aaiclient.client.graphinventory.Format) CustomQuery(org.onap.aaiclient.client.aai.entities.CustomQuery) AAIResourceUri(org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CustomQuery (org.onap.aaiclient.client.aai.entities.CustomQuery)1 AAIResourceUri (org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri)1 Format (org.onap.aaiclient.client.graphinventory.Format)1