X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-XACML%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fxacml%2Ftest%2Fstd%2Fpap%2FStdEngineFactoryTest.java;fp=ONAP-XACML%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fxacml%2Ftest%2Fstd%2Fpap%2FStdEngineFactoryTest.java;h=2e0a0de17753ca37df40778865ac756ae3ff4e39;hb=c02b38c14ddeed80faebadc2c4dbe3cc6a056742;hp=500136fc0660e3f25faa5d43fcd0ab5d95be89f5;hpb=141052c6dcabdddf20f2b46d95540f1ceb0d7299;p=policy%2Fengine.git diff --git a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java index 500136fc0..2e0a0de17 100644 --- a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java +++ b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java @@ -21,10 +21,13 @@ package org.onap.policy.xacml.test.std.pap; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; + import java.io.IOException; import java.util.Properties; + import org.junit.Test; import org.onap.policy.xacml.std.pap.StdEngineFactory; + import com.att.research.xacml.api.pap.PAPException; import com.att.research.xacml.std.pap.StdEngine; import com.att.research.xacml.util.FactoryException; @@ -45,15 +48,16 @@ public class StdEngineFactoryTest { } @Test - public void testNegativeCase() throws FactoryException, PAPException { + public void testNegativeCase() throws Exception { // Setup test data Properties props = new Properties(); - props.setProperty(StdEngine.PROP_PAP_REPO, "/tmp"); + String tmpdir = System.getProperty("java.io.tmpdir"); + props.setProperty(StdEngine.PROP_PAP_REPO, tmpdir); // Set the system property temporarily String systemKey = StdEngine.PROP_PAP_REPO; String oldProperty = System.getProperty(systemKey); - System.setProperty(systemKey, "/tmp"); + System.setProperty(systemKey, tmpdir); // Test factory failure cases try {