aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/simulators/src/main
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@ericsson.com>2017-12-14 07:40:18 -0800
committerLiam Fallon <liam.fallon@ericsson.com>2017-12-14 20:07:40 -0800
commitfe4cd8e4c08a19ac543ca93c577b8b3a12a1524f (patch)
tree263a3c0dc2ad9504c6a891f6c5b9d025b0fa74b7 /controlloop/common/simulators/src/main
parent5cfd3b7066e6a6305e140fa59b1fccb8e3c5f81b (diff)
Cleanup of A&AI message model module.
Fields have been made fields private in POJOs, and wrote JUnit unit tests to bring up code coverage. AAIManager also changed to use non-static methods so that it can be stubbed with Mockito. Change-Id: I871427ced5db8a1dfd6495fef4e6d84adf264e65 Signed-off-by: Liam Fallon <liam.fallon@ericsson.com> Issue-ID: POLICY-455 Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
Diffstat (limited to 'controlloop/common/simulators/src/main')
-rw-r--r--controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java
index 2f511f4bc..c6b22cf70 100644
--- a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java
+++ b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java
@@ -52,9 +52,9 @@ public class AaiSimulatorJaxRs {
{
AAINQRequest request = Serialization.gsonPretty.fromJson(req, AAINQRequest.class);
- if (request.instanceFilters.getInstanceFilter().get(0).containsKey("vserver"))
+ if (request.getInstanceFilters().getInstanceFilter().get(0).containsKey("vserver"))
{
- String vserverName = request.instanceFilters.getInstanceFilter().get(0).get("vserver").get("vserver-name");
+ String vserverName = request.getInstanceFilters().getInstanceFilter().get(0).get("vserver").get("vserver-name");
if ("error".equals(vserverName)) {
return "{\"requestError\":{\"serviceException\":{\"messageId\":\"SVC3001\",\"text\":\"Resource not found for %1 using id %2 (msg=%3) (ec=%4)\",\"variables\":[\"POST Search\",\"getNamedQueryResponse\",\"Node Not Found:No Node of type vserver found for properties\",\"ERR.5.4.6114\"]}}}";
}
@@ -66,7 +66,7 @@ public class AaiSimulatorJaxRs {
}
else
{
- String vnfID = request.instanceFilters.getInstanceFilter().get(0).get("generic-vnf").get("vnf-id");
+ String vnfID = request.getInstanceFilters().getInstanceFilter().get(0).get("generic-vnf").get("vnf-id");
if ("error".equals(vnfID)) {
return "{\"requestError\":{\"serviceException\":{\"messageId\":\"SVC3001\",\"text\":\"Resource not found for %1 using id %2 (msg=%3) (ec=%4)\",\"variables\":[\"POST Search\",\"getNamedQueryResponse\",\"Node Not Found:No Node of type generic-vnf found for properties\",\"ERR.5.4.6114\"]}}}";
}