aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-11-12 14:48:30 -0500
committerPamela Dragosh <pdragosh@research.att.com>2019-11-19 07:30:55 -0500
commitd089848fdb0beef8446bdcf60cdb14e4655a93e5 (patch)
tree5c93d8b4ab6a119dcbb83738070061f13a1c6474 /ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java
parenta2ab61f0ad39970ad35c3e47ff8429f59850c469 (diff)
Format ONAP-XACML and add JUnit
Formatting and sonar issues. Cleaned up JUnit tests. Added more JUnit test coverage. Issue-ID: POLICY-2242 Change-Id: Ife0921971c6eb97de2a64b2f303cd16f992b4bd3 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java')
-rw-r--r--ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java
index 7aaa381ce..98dc4d61c 100644
--- a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java
+++ b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP-XACML
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Modifications Copyright (C) 2019 Samsung
* ================================================================================
@@ -27,14 +27,17 @@ import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
+
+import com.att.research.xacml.api.pap.PAPException;
+
import java.io.IOException;
import java.net.ConnectException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Properties;
+
import org.junit.Test;
import org.onap.policy.xacml.std.pap.StdPDPPolicy;
-import com.att.research.xacml.api.pap.PAPException;
import org.onap.policy.xacml.std.pap.StdPDPPolicyParams;
public class StdPDPPolicyTest {
@@ -53,9 +56,8 @@ public class StdPDPPolicyTest {
StdPDPPolicy policy4 = new StdPDPPolicy();
assertNotNull(policy4);
- StdPDPPolicy policy5 = new StdPDPPolicy(
- StdPDPPolicyParams.builder().id(value).isRoot(true).name(value).location(uri)
- .isValid(false).policyId(value).description(value).version("1").build());
+ StdPDPPolicy policy5 = new StdPDPPolicy(StdPDPPolicyParams.builder().id(value).isRoot(true).name(value)
+ .location(uri).isValid(false).policyId(value).description(value).version("1").build());
assertNotNull(policy5);
StdPDPPolicy policy6 = new StdPDPPolicy(value, true, value, uri, false);
assertNotNull(policy6);
@@ -117,9 +119,8 @@ public class StdPDPPolicyTest {
// Set up test data
String value = "testVal";
URI uri = new URI("http://localhost:54287");
- StdPDPPolicy policy = new StdPDPPolicy(
- StdPDPPolicyParams.builder().id(value).isRoot(true).name(value).location(uri)
- .isValid(false).policyId(value).description(value).version("1").build());
+ StdPDPPolicy policy = new StdPDPPolicy(StdPDPPolicyParams.builder().id(value).isRoot(true).name(value)
+ .location(uri).isValid(false).policyId(value).description(value).version("1").build());
// Negative test stream
policy.getStream();