X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PDP-REST%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpdp%2Frest%2Fapi%2Ftest%2FPolicyEngineServicesTest.java;h=fe4ce059975235a98628de96482a6a52e978160e;hb=80f072f60509ef3a35369a60857fe05f6c2a993a;hp=2a76f581c8482d5ee0f467952a38bde862f412b6;hpb=073cc188efe9abb4c010cf674e34e2cf46ef1c52;p=policy%2Fengine.git diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/test/PolicyEngineServicesTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/test/PolicyEngineServicesTest.java index 2a76f581c..fe4ce0599 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/test/PolicyEngineServicesTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/test/PolicyEngineServicesTest.java @@ -195,6 +195,9 @@ public class PolicyEngineServicesTest { @Test public void getNotificationTopicValidPassTest() throws Exception{ + XACMLProperties.reloadProperties(); + System.setProperty(XACMLProperties.XACML_PROPERTIES_NAME, "src/test/resources/notification.xacml.pdp.properties"); + XACMLProperties.getProperties(); // Add a Topic. mockMvc.perform(post("/getNotification").headers(headers).header(UUIDHEADER, "123").content("test")).andExpect(status().isOk()); // Try to add same topic should fail. @@ -236,7 +239,7 @@ public class PolicyEngineServicesTest { DecisionRequestParameters pep = new DecisionRequestParameters(); Map eventAttributes = new HashMap<>(); eventAttributes.put("TEST", "test"); - pep.setONAPComponentName("te123"); + pep.setOnapName("te123"); pep.setDecisionAttributes(eventAttributes); //Failure Tests. mockMvc.perform(post("/getDecision")).andExpect(status().isBadRequest()); @@ -245,10 +248,10 @@ public class PolicyEngineServicesTest { mockMvc.perform(post("/getDecision").content(PolicyUtils.objectToJsonString(pep)).contentType(MediaType.APPLICATION_JSON) .headers(headers).header(UUIDHEADER, "123")).andExpect(status().isOk()); pep.setDecisionAttributes(null); - pep.setONAPComponentName(null); + pep.setOnapName(null); mockMvc.perform(post("/getDecision").content(PolicyUtils.objectToJsonString(pep)).contentType(MediaType.APPLICATION_JSON) .headers(headers).header(UUIDHEADER, UUID.randomUUID())).andExpect(status().isBadRequest()); - pep.setONAPComponentName("testing"); + pep.setOnapName("testing"); mockMvc.perform(post("/getDecision").content(PolicyUtils.objectToJsonString(pep)).contentType(MediaType.APPLICATION_JSON) .headers(headers)).andExpect(status().isBadRequest()); pep.setDecisionAttributes(eventAttributes);