diff options
Diffstat (limited to 'applications')
-rw-r--r-- | applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java index ed63bb9c..318d9f9f 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java @@ -37,8 +37,9 @@ import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.List; import java.util.Properties; - +import java.util.stream.Collectors; import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.EffectType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.MatchType; @@ -109,6 +110,16 @@ public class XacmlPolicyUtilsTest { properties.load(is); } // + // Change "/" to file separator in file names + // + if (!"/".equals(File.separator)) { + List<String> fileProps = properties.keySet().stream().map(Object::toString) + .filter(key -> key.endsWith(".file")).collect(Collectors.toList()); + for (String fileProp : fileProps) { + properties.setProperty(fileProp, properties.getProperty(fileProp).replace("/", File.separator)); + } + } + // // Save root policy // File rootFile = policyFolder.newFile("root.xml"); |