From f76219ff66e53df732cfee41771baa68d9a0a74c Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Thu, 14 Feb 2019 19:59:07 -0500 Subject: query clients now set their expected object unit test is using the wrong number of keys for aai uri query clients now set their expected object for method Change-Id: I622c76cee0e9d47be35a78156267bf1c22cbf404 Issue-ID: SO-1514 Signed-off-by: Benjamin, Max (mb388a) --- common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java | 3 ++- common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java | 3 ++- .../org/onap/so/client/graphinventory/GraphInventoryQueryClient.java | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'common/src/main/java/org') diff --git a/common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java b/common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java index e9b58b469d..4cee4f3df7 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java @@ -22,9 +22,10 @@ package org.onap.so.client.aai; import org.onap.so.client.aai.entities.uri.AAIUriFactory; import org.onap.so.client.graphinventory.GraphInventoryQueryClient; +import org.onap.so.client.graphinventory.entities.DSLQuery; import org.onap.so.client.graphinventory.entities.uri.GraphInventoryUri; -public class AAIDSLQueryClient extends GraphInventoryQueryClient { +public class AAIDSLQueryClient extends GraphInventoryQueryClient { public AAIDSLQueryClient() { super(new AAIClient()); diff --git a/common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java b/common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java index c3523e94c2..66d5d1f5cb 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java @@ -20,11 +20,12 @@ package org.onap.so.client.aai; +import org.onap.so.client.aai.entities.CustomQuery; import org.onap.so.client.aai.entities.uri.AAIUriFactory; import org.onap.so.client.graphinventory.GraphInventoryQueryClient; import org.onap.so.client.graphinventory.entities.uri.GraphInventoryUri; -public class AAIQueryClient extends GraphInventoryQueryClient { +public class AAIQueryClient extends GraphInventoryQueryClient { public AAIQueryClient() { super(new AAIClient()); diff --git a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryQueryClient.java b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryQueryClient.java index aa4842fe2a..c4bf0f0beb 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryQueryClient.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryQueryClient.java @@ -25,7 +25,7 @@ import java.util.Optional; import org.onap.so.client.aai.entities.CustomQuery; import org.onap.so.client.graphinventory.entities.uri.GraphInventoryUri; -public abstract class GraphInventoryQueryClient { +public abstract class GraphInventoryQueryClient { private Optional depth = Optional.empty(); private boolean nodesOnly = false; @@ -38,7 +38,7 @@ public abstract class GraphInventoryQueryClient { protected abstract GraphInventoryUri getQueryUri(); - public String query(Format format, CustomQuery query) { + public String query(Format format, I query) { return client.createClient(setupQueryParams(getQueryUri().queryParam("format", format.toString()))).put(query, String.class); } -- cgit 1.2.3-korg