diff options
author | Liam Fallon <liam.fallon@ericsson.com> | 2018-01-16 18:42:01 +0000 |
---|---|---|
committer | Liam Fallon <liam.fallon@ericsson.com> | 2018-01-16 18:47:17 +0000 |
commit | 59d71c593d295b2bd48a9971d89635f95759a0a2 (patch) | |
tree | 8cbdbd5180979b0c3aeb19739716462983bcb1cc /controlloop/templates | |
parent | 2b9b989f99700ebc11f77d8da2df4538fe7105d2 (diff) |
Fix Sonar Technical Debt, Unit Test for APPC POJOs
Mainly making fields private, fixing field and methods to follow Java guidelines, and adding getter and setter methods. Unit test added for all classes in org.onap.policy.appc
Change-Id: If3db740bc146a09f8f7387f02c12b048ad00b201
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/templates')
2 files changed, 3 insertions, 4 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java index 377cff465..c95d558a5 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java @@ -45,7 +45,6 @@ import org.onap.policy.controlloop.ControlLoopTargetType; import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.policy.ControlLoopPolicy; -import org.onap.policy.controlloop.policy.TargetType; import org.onap.policy.drools.event.comm.Topic.CommInfrastructure; import org.onap.policy.drools.event.comm.TopicEndpoint; import org.onap.policy.drools.event.comm.TopicListener; diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java index 5ef20b544..95737b9c8 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java @@ -380,7 +380,7 @@ public class VFWControlLoopTest implements TopicListener { } } else if (obj instanceof Request) { - assertTrue(((Request)obj).getCommonHeader().SubRequestID.equals("1")); + assertTrue(((Request)obj).getCommonHeader().getSubRequestID().equals("1")); assertNotNull(((Request)obj).getPayload().get("generic-vnf.vnf-id")); logger.debug("\n============ APPC received the request!!! ===========\n"); @@ -390,8 +390,8 @@ public class VFWControlLoopTest implements TopicListener { * the response into the working memory */ Response appcResponse = new Response((Request)obj); - appcResponse.getStatus().Code = ResponseCode.SUCCESS.getValue(); - appcResponse.getStatus().Value = "SUCCESS"; + appcResponse.getStatus().setCode(ResponseCode.SUCCESS.getValue()); + appcResponse.getStatus().setValue("SUCCESS"); kieSession.insert(appcResponse); } } |