Search in sources :

Example 1 with GraphInventorySubgraphType

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

the class AAIQueryClientTest method testCreateClient.

@Test
public void testCreateClient() {
    Depth depth = Depth.ZERO;
    GraphInventorySubgraphType subgraph = GraphInventorySubgraphType.STAR;
    aaiQueryClient.depth(depth);
    aaiQueryClient.nodesOnly();
    aaiQueryClient.subgraph(subgraph);
    AAIResourceUri aaiUri = spy(AAIUriFactory.createResourceUri(AAIObjectType.CUSTOM_QUERY));
    doReturn(aaiUri).when(aaiUri).clone();
    aaiQueryClient.setupQueryParams(aaiUri);
    verify(aaiUri, times(1)).queryParam("depth", "0");
    verify(aaiUri, times(1)).queryParam("nodesOnly", "");
    verify(aaiUri, times(1)).queryParam("subgraph", subgraph.toString());
}
Also used : GraphInventorySubgraphType(org.onap.aaiclient.client.graphinventory.GraphInventorySubgraphType) AAIResourceUri(org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri) Depth(org.onap.aaiclient.client.graphinventory.entities.uri.Depth) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 AAIResourceUri (org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri)1 GraphInventorySubgraphType (org.onap.aaiclient.client.graphinventory.GraphInventorySubgraphType)1 Depth (org.onap.aaiclient.client.graphinventory.entities.uri.Depth)1