Fix sonar issue and add code coverage 79/111379/1
authorPamela Dragosh <pdragosh@research.att.com>
Tue, 18 Aug 2020 16:24:04 +0000 (12:24 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Tue, 18 Aug 2020 16:24:08 +0000 (12:24 -0400)
commitc663e0061b92542d961db5f88039151acb7f63df
tree0bb1f2f61d74f6489ea77a872273b57680e25faa
parentad9d827a43211c087fe4bcf575134aea3a5b316e
Fix sonar issue and add code coverage

Fixing too much complexity for GuardPolicyRequest by breaking
it up into methods.

Added more code coverage to guard translator.

Added missing code coverage for coordination guard, it was below
66% and there were some trivial fixes that were needed. Seems that
a test resource was never really used, or perhaps got omitted in a
previous review.

Issue-ID: POLICY-2590
Change-Id: I1be4ff166e6c43c1c4ea54fdf7e761e22adcaa2d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java
applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardPolicyRequest.java
applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslatorTest.java [new file with mode: 0644]
applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslatorTest.java
applications/guard/src/test/resources/test-directive.yaml