aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/dcae/vestest/TestJsonSchemaValidation.java
diff options
context:
space:
mode:
authorPawelSzalapski <pawel.szalapski@nokia.com>2018-07-31 08:18:03 +0200
committerPawelSzalapski <pawel.szalapski@nokia.com>2018-08-01 09:56:00 +0200
commitfc073344d4c0eb8a28bf34c07a8439176cf846ca (patch)
tree01f5b4789c3d9369eaebb54a9f910a9fa400af1f /src/test/java/org/onap/dcae/vestest/TestJsonSchemaValidation.java
parentd12cd3525284cc41414d8fdae09e2ffbc03a1fbb (diff)
Replace nsaCore library with Spring
Change-Id: I2227939a67a2cbba2d392136d49ef4419600d186 Issue-ID: DCAEGEN2-602 Signed-off-by: PawelSzalapski <pawel.szalapski@nokia.com>
Diffstat (limited to 'src/test/java/org/onap/dcae/vestest/TestJsonSchemaValidation.java')
-rw-r--r--src/test/java/org/onap/dcae/vestest/TestJsonSchemaValidation.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/java/org/onap/dcae/vestest/TestJsonSchemaValidation.java b/src/test/java/org/onap/dcae/vestest/TestJsonSchemaValidation.java
index 0489811d..c39fb013 100644
--- a/src/test/java/org/onap/dcae/vestest/TestJsonSchemaValidation.java
+++ b/src/test/java/org/onap/dcae/vestest/TestJsonSchemaValidation.java
@@ -28,24 +28,24 @@ import com.google.gson.JsonParser;
import java.io.IOException;
import java.nio.file.Paths;
import org.junit.Test;
-import org.onap.dcae.commonFunction.CommonStartup;
+import org.onap.dcae.SchemaValidator;
public class TestJsonSchemaValidation {
@Test
public void shouldValidEventPassSchema_27_2() throws IOException {
- String result = CommonStartup.validateAgainstSchema(
- readJSONFromFile("src/test/resources/VES_valid.txt").toString(),
- readJSONFromFile("etc/CommonEventFormat_27.2.json").toString());
+ String result = SchemaValidator.validateAgainstSchema(
+ readJSONFromFile("src/test/resources/VES_valid.txt").toString(),
+ readJSONFromFile("etc/CommonEventFormat_27.2.json").toString());
assertEquals(result, "true");
}
@Test
public void shouldInvalidEventDoesNotPassSchema_27_2() throws IOException {
- String result = CommonStartup.validateAgainstSchema(
- readJSONFromFile("src/test/resources/VES_invalid.txt").toString(),
- readJSONFromFile("etc/CommonEventFormat_27.2.json").toString());
+ String result = SchemaValidator.validateAgainstSchema(
+ readJSONFromFile("src/test/resources/VES_invalid.txt").toString(),
+ readJSONFromFile("etc/CommonEventFormat_27.2.json").toString());
assertEquals(result, "false");
}