summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/aai/sparky/util/TestResourceLoader.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/onap/aai/sparky/util/TestResourceLoader.java')
-rw-r--r--src/test/java/org/onap/aai/sparky/util/TestResourceLoader.java31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/test/java/org/onap/aai/sparky/util/TestResourceLoader.java b/src/test/java/org/onap/aai/sparky/util/TestResourceLoader.java
deleted file mode 100644
index 7b1b198..0000000
--- a/src/test/java/org/onap/aai/sparky/util/TestResourceLoader.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.onap.aai.sparky.util;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URL;
-import java.nio.file.Files;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-
-public class TestResourceLoader {
-
- public static String getTestResourceDataJson(String resourcePath)
- throws JsonParseException, JsonMappingException, IOException {
-
- // will look for resource using "src/test/resources" as the base folder
- URL url = TestResourceLoader.class.getResource(resourcePath);
- File file = new File(url.getFile());
-
- byte[] payload = Files.readAllBytes(file.toPath());
-
- if (payload.length == 0) {
- throw new FileNotFoundException("Could not load '" + resourcePath + "' test data");
- }
-
- return new String(payload);
-
- }
-
-}