summaryrefslogtreecommitdiffstats
path: root/ONAP-XACML/src/test
diff options
context:
space:
mode:
authorkrishnajinka <krishna.jinka@gmail.com>2018-08-08 06:42:50 +0900
committerKrishnakumar Jinka <kris.jinka@samsung.com>2018-08-08 09:50:17 +0000
commit5e8b7f573f0f7f08be242ee017ecf1243317f1b5 (patch)
tree0044717968f0de227b9f8ef177f34810e9b2a096 /ONAP-XACML/src/test
parent47c46108782dccd44101b772ba979e3fdf3ead04 (diff)
Fix sonar issue with constrctr in xacml comp
Fix sonar issue of Method has 9 parameters, which is greater than 7 authorized in StdPDPPolicy. Make the actual sonar fix Issue-ID: POLICY-1016 Change-Id: Ibc79ddce81a6209ec190c7f393557e9c569df453 Signed-off-by: krisjinka <kris.jinka@samsung.com>
Diffstat (limited to 'ONAP-XACML/src/test')
-rw-r--r--ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java25
1 files changed, 23 insertions, 2 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 cf293beef..26af008b6 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
@@ -3,6 +3,7 @@
* ONAP-XACML
* ================================================================================
* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modified Copyright (C) 2018 Samsung Electronics Co., Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,6 +34,7 @@ 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 {
@@ -50,7 +52,17 @@ public class StdPDPPolicyTest {
assertNotNull(policy2);
StdPDPPolicy policy4 = new StdPDPPolicy();
assertNotNull(policy4);
- StdPDPPolicy policy5 = new StdPDPPolicy(value, true, value, uri, false, value, value, "1");
+
+ 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);
@@ -112,7 +124,16 @@ public class StdPDPPolicyTest {
// Set up test data
String value = "testVal";
URI uri = new URI("http://localhost:54287");
- StdPDPPolicy policy = new StdPDPPolicy(value, true, value, uri, false, value, value, "1");
+ 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();