From 28f9fa1399f5e513a3d5860c52cd51b615bc0a2c Mon Sep 17 00:00:00 2001 From: "Sotiropoulos, Ioannis (is948x)" Date: Mon, 11 Jun 2018 09:54:54 +0100 Subject: Process multi-OXM files Gizmo service uses common OXM consumer to process multi-OXM files Issue-ID: AAI-1196 Change-Id: If6dd50413a914984948272cd6bd98e2eeeaecedb Signed-off-by: Sotiropoulos, Ioannis (is948x) --- .../java/org/onap/schema/RelationshipSchemaLoaderTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java') diff --git a/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java b/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java index 4e6590d..feeb1c4 100644 --- a/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java +++ b/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java @@ -23,7 +23,8 @@ package org.onap.schema; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import java.io.File; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; @@ -34,10 +35,10 @@ import org.onap.crud.exception.CrudException; public class RelationshipSchemaLoaderTest { @Before - public void init() { - ClassLoader classLoader = getClass().getClassLoader(); - File dir = new File(classLoader.getResource( "model").getFile()); - System.setProperty("CONFIG_HOME", dir.getParent()); + public void init() throws Exception { + Path resourcePath = Paths.get(ClassLoader.getSystemResource("model").toURI()); + Path parentPath = resourcePath.getParent(); + System.setProperty("CONFIG_HOME", parentPath.toString()); RelationshipSchemaLoader.resetVersionContextMap(); } -- cgit 1.2.3-korg