summaryrefslogtreecommitdiffstats
path: root/ONAP-XACML/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'ONAP-XACML/src/test')
-rw-r--r--ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPAPPolicyTest.java41
1 files changed, 32 insertions, 9 deletions
diff --git a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPAPPolicyTest.java b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPAPPolicyTest.java
index aa57c27f0..4a9370c41 100644
--- a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPAPPolicyTest.java
+++ b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPAPPolicyTest.java
@@ -586,7 +586,7 @@ public class StdPAPPolicyTest {
.description("description")
.onapName("onapName")
.configName("configName")
- .attributes(attributes)
+ .dyanamicFieldConfigAttributes(attributes)
.configType("configType")
.configBodyData("body")
.editPolicy(true)
@@ -624,10 +624,18 @@ public class StdPAPPolicyTest {
dynamicRuleAlgorithmField1.add("dynamicRuleAlgorithmField1");
List<String> dynamicRuleAlgorithmField2 = new ArrayList<>();
dynamicRuleAlgorithmField2.add("dynamicRuleAlgorithmField2");
- StdPAPPolicy stdPAPPolicy = new StdPAPPolicy("policyName", "description", attributes,
- dynamicRuleAlgorithmLabels, dynamicRuleAlgorithmCombo, dynamicRuleAlgorithmField1,
- dynamicRuleAlgorithmField2,
- "actionPerformer", "actionAttribute", true, "domain", 1);
+ StdPAPPolicy stdPAPPolicy = new StdPAPPolicy(StdPAPPolicyParams.builder().policyName("policyName").description("description")
+ .dyanamicFieldConfigAttributes(attributes)
+ .dynamicRuleAlgorithmLabels(dynamicRuleAlgorithmLabels)
+ .dynamicRuleAlgorithmCombo(dynamicRuleAlgorithmCombo)
+ .dynamicRuleAlgorithmField1(dynamicRuleAlgorithmField1)
+ .dynamicRuleAlgorithmField2(dynamicRuleAlgorithmField2)
+ .actionPerformer("actionPerformer")
+ .actionAttribute("actionAttribute")
+ .editPolicy(true)
+ .domain("domain")
+ .highestVersion(1)
+ .build());
assertEquals("policyName", stdPAPPolicy.getPolicyName());
assertEquals("description", stdPAPPolicy.getPolicyDescription());
assertEquals(attributes, stdPAPPolicy.getDynamicFieldConfigAttributes());
@@ -664,10 +672,25 @@ public class StdPAPPolicyTest {
dynamicVariableList.add("dynamicVariableList");
List<String> dataTypeList = new ArrayList<>();
dataTypeList.add("dataTypeList");
- StdPAPPolicy stdPAPPolicy = new StdPAPPolicy("policyName", "description", "onapName", "providerComboBox",
- attributes, settings, treatments, dynamicRuleAlgorithmLabels, dynamicRuleAlgorithmCombo,
- dynamicRuleAlgorithmField1, dynamicRuleAlgorithmField2, dropDownMap, dynamicVariableList,
- dataTypeList, true, "domain", 1);
+ StdPAPPolicy stdPAPPolicy = new StdPAPPolicy(StdPAPPolicyParams.builder()
+ .policyName("policyName")
+ .description("description")
+ .onapName("onapName")
+ .providerComboBox("providerComboBox")
+ .dyanamicFieldConfigAttributes(attributes)
+ .dynamicSettingsMap(settings)
+ .treatments(treatments)
+ .dynamicRuleAlgorithmLabels(dynamicRuleAlgorithmLabels)
+ .dynamicRuleAlgorithmCombo(dynamicRuleAlgorithmCombo)
+ .dynamicRuleAlgorithmField1(dynamicRuleAlgorithmField1)
+ .dynamicRuleAlgorithmField2(dynamicRuleAlgorithmField2)
+ .dropDownMap(dropDownMap)
+ .dynamicVariableList(dynamicVariableList)
+ .dataTypeList(dataTypeList)
+ .editPolicy(true)
+ .domain("domain")
+ .highestVersion(1)
+ .build());
assertEquals("policyName", stdPAPPolicy.getPolicyName());
assertEquals("description", stdPAPPolicy.getPolicyDescription());
assertEquals("onapName", stdPAPPolicy.getOnapName());