X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Ftest%2FXACMLPAPTest.java;h=bb14ff8665d121f4e38b03551c3689d1eee59186;hb=refs%2Fchanges%2F23%2F60423%2F2;hp=ab4f2a00f4824a7c2a2fd2511343bcb1921cf9d9;hpb=5368a1d66dce2a1029e947a43e8ccdcfad98fbc8;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java index ab4f2a00f..bb14ff866 100644 --- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java @@ -182,8 +182,20 @@ public class XACMLPAPTest { Mockito.when(httpServletRequest.getParameter("operation")).thenReturn("create"); Mockito.when(httpServletRequest.getParameter("policyType")).thenReturn("Config"); StdPAPPolicy newPAPPolicy = - new StdPAPPolicy("Firewall Config", "test", "testDescription", "Test", false, "test", json, 0, - "5", "default", "false", ""); + new StdPAPPolicy(StdPAPPolicyParams.builder() + .configPolicyType("Firewall Config") + .policyName("test") + .description("testDescription") + .configName("Test") + .editPolicy(false) + .domain("test") + .jsonBody(json) + .highestVersion(0) + .riskLevel("5") + .riskType("default") + .guard("false") + .ttlDate("") + .build()); MockServletInputStream mockInput = new MockServletInputStream(PolicyUtils.objectToJsonString(newPAPPolicy).getBytes()); Mockito.when(httpServletRequest.getInputStream()).thenReturn(mockInput); @@ -239,10 +251,21 @@ public class XACMLPAPTest { Mockito.when(httpServletRequest.getParameter("policyType")).thenReturn("Config"); Map ruleAttributes = new HashMap<>(); ruleAttributes.put("value", "test"); - StdPAPPolicy newPAPPolicy = new StdPAPPolicy("BRMS_Raw", "test", "testig description", - "BRMS_RAW_RULE", false, "test", ruleAttributes, 0, "DROOLS", - "test", "4", - "default", "false", null, null, null); + StdPAPPolicy newPAPPolicy = new StdPAPPolicy(StdPAPPolicyParams.builder() + .configPolicyType("BRMS_Raw") + .policyName("test") + .description("testig description") + .configName("BRMS_RAW_RULE") + .editPolicy(false) + .domain("test") + .dynamicFieldConfigAttributes(ruleAttributes) + .highestVersion(0) + .onapName("DROOLS") + .configBodyData("test") + .riskLevel("4") + .riskType("default") + .guard("false") + .build()); MockServletInputStream mockInput = new MockServletInputStream(PolicyUtils.objectToJsonString(newPAPPolicy).getBytes()); Mockito.when(httpServletRequest.getInputStream()).thenReturn(mockInput); @@ -338,7 +361,7 @@ public class XACMLPAPTest { .description("test rule") .onapName("PDPD") .providerComboBox("GUARD_YAML") - .dyanamicFieldConfigAttributes(matchingAttributes) + .dynamicFieldConfigAttributes(matchingAttributes) .editPolicy(false) .domain("test") .highestVersion(0) @@ -377,7 +400,7 @@ public class XACMLPAPTest { .description("test rule") .onapName("PDPD") .providerComboBox("GUARD_BL_YAML") - .dyanamicFieldConfigAttributes(matchingAttributes) + .dynamicFieldConfigAttributes(matchingAttributes) .editPolicy(false) .domain("test") .highestVersion(0) @@ -411,7 +434,7 @@ public class XACMLPAPTest { .description("test rule") .onapName("TEST") .configName("config") - .dyanamicFieldConfigAttributes(configAttributes) + .dynamicFieldConfigAttributes(configAttributes) .configType("OTHER") .configBodyData("test body") .editPolicy(false)