aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/dcae/vestest/VESCollectorJunitTest.java
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2017-09-14 02:27:35 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-14 02:27:35 +0000
commit486378d5d62c1a0939187fdb3e6c1c0f7c765479 (patch)
tree75081eb938763eeadd70b2e2949b85af371713d1 /src/test/java/org/onap/dcae/vestest/VESCollectorJunitTest.java
parentd5dc08c6f474414570009b6ff6041c30e4cf192f (diff)
parentbff565387a2f4c0c50566a87c77699480217459d (diff)
Merge "update to fix junit and coverage"
Diffstat (limited to 'src/test/java/org/onap/dcae/vestest/VESCollectorJunitTest.java')
-rw-r--r--src/test/java/org/onap/dcae/vestest/VESCollectorJunitTest.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/test/java/org/onap/dcae/vestest/VESCollectorJunitTest.java b/src/test/java/org/onap/dcae/vestest/VESCollectorJunitTest.java
index 0e737175..eb1ebfde 100644
--- a/src/test/java/org/onap/dcae/vestest/VESCollectorJunitTest.java
+++ b/src/test/java/org/onap/dcae/vestest/VESCollectorJunitTest.java
@@ -32,10 +32,11 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
+import org.json.JSONObject;
import org.junit.Test;
public class VESCollectorJunitTest {
- public static String schemaFile=null;
+ public static String schemaFile="etc/CommonEventFormat_27.2.json";
public static String output;
@@ -53,8 +54,12 @@ public class VESCollectorJunitTest {
input = new FileInputStream("etc/collector.properties");
try {
prop.load(input);
- schemaFile=prop.getProperty("collector.schema.file");
+ //schemaFile=prop.getProperty("collector.schema.file");
+ JSONObject schemaFileJson = new JSONObject(prop.getProperty("collector.schema.file"));
+ System.out.println("JSON Schemafile" + schemaFileJson);
+ //schemaFile = schemaFileJson.getString("v4");
+
System.out.println( "Schema file location: "+ schemaFile);
} catch (IOException e) {
// TODO Auto-generated catch block
@@ -65,7 +70,7 @@ public class VESCollectorJunitTest {
e.printStackTrace();
}
- assertEquals(message,output);
+ assertEquals("true",output);
}
@@ -78,8 +83,13 @@ public class VESCollectorJunitTest {
input = new FileInputStream("etc/collector.properties");
try {
prop.load(input);
- schemaFile=prop.getProperty("collector.schema.file");
+
+ //schemaFile=prop.getProperty("collector.schema.file");
+ JSONObject schemaFileJson = new JSONObject(prop.getProperty("collector.schema.file"));
+ System.out.println("JSON Schemafile" + schemaFileJson);
+ //schemaFile = schemaFileJson.getString("v4");
+
System.out.println( "Schema file location: "+ schemaFile);
} catch (IOException e) {
// TODO Auto-generated catch block
@@ -107,3 +117,4 @@ public class VESCollectorJunitTest {
}
+