summaryrefslogtreecommitdiffstats
path: root/applications/common/src/test
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-09-16 13:09:46 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-10-09 12:08:59 -0400
commitc19f81387f4efc666cfa45b000275f3ee7c1d9d1 (patch)
tree0c6ffe39a15e95f01d40e5a7214bc0d5a9bfa232 /applications/common/src/test
parent6f145256b9d9ac6c0e0b6073afb5d1fa178a84a4 (diff)
Sonar xacml-pdp issues
Either log or re-throw exception Refactor to not nest more than 3 statements Refactor to throw at most one exception Move variable to comply with Java Code conventions String literal on LHS Issue-ID: POLICY-2079 Change-Id: Iac33623ef4694cf38c4a69c8f0b9040d8439998e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/common/src/test')
-rw-r--r--applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequestTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequestTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequestTest.java
index 1c844621..d3e362c1 100644
--- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequestTest.java
+++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequestTest.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
-import com.att.research.xacml.api.DataTypeException;
import com.att.research.xacml.api.Request;
import com.att.research.xacml.api.RequestAttributes;
import com.att.research.xacml.api.XACML3;
@@ -39,6 +38,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
import org.onap.policy.pdp.xacml.application.common.ToscaDictionary;
+import org.onap.policy.pdp.xacml.application.common.XacmlApplicationException;
public class StdMatchablePolicyRequestTest {
private static final String ACTION = "my-action";
@@ -74,7 +74,7 @@ public class StdMatchablePolicyRequestTest {
}
@Test
- public void testCreateInstance() throws IllegalAccessException, DataTypeException {
+ public void testCreateInstance() throws XacmlApplicationException {
resources.put("resource1", RESOURCE1);
resources.put("resource2", RESOURCE2);
resources.put("resource3", Arrays.asList(RESOURCE3, RESOURCE4));