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%2Fservices%2FConfigPolicyServiceTest.java;h=16f5a473275230847034fe849d94453da9629a7b;hb=b6d9063e06ab8cdf2d97fc75810792659344e4a8;hp=389d9bfc167ed4b72cb351fe1b743155db214f92;hpb=c8bed1e392b935ec50aaeeb5fb82d25a9568b790;p=policy%2Fengine.git diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ConfigPolicyServiceTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ConfigPolicyServiceTest.java index 389d9bfc1..16f5a4732 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ConfigPolicyServiceTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ConfigPolicyServiceTest.java @@ -20,13 +20,27 @@ package org.onap.policy.pdp.rest.api.services; import static org.junit.Assert.assertEquals; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.Properties; + import org.junit.Test; -import org.onap.policy.api.PolicyException; import org.onap.policy.api.PolicyParameters; public class ConfigPolicyServiceTest { @Test - public void testRaw() throws PolicyException { + public void testRaw() throws FileNotFoundException, IOException { + Properties prop = new Properties(); + prop.load(new FileInputStream("src/test/resources/pass.xacml.pdp.properties")); + String succeeded = prop.getProperty("xacml.rest.pap.url"); + List paps = Arrays.asList(succeeded.split(",")); + PAPServices.setPaps(paps); + PAPServices.setJunit(true); + String systemKey = "xacml.properties"; String testVal = "testVal"; PolicyParameters testParams = new PolicyParameters();