summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/dcae/vestest/TestEventReceipt.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/onap/dcae/vestest/TestEventReceipt.java')
-rw-r--r--src/test/java/org/onap/dcae/vestest/TestEventReceipt.java28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/test/java/org/onap/dcae/vestest/TestEventReceipt.java b/src/test/java/org/onap/dcae/vestest/TestEventReceipt.java
index 3af66fb0..2e4053f7 100644
--- a/src/test/java/org/onap/dcae/vestest/TestEventReceipt.java
+++ b/src/test/java/org/onap/dcae/vestest/TestEventReceipt.java
@@ -98,6 +98,7 @@ public class TestEventReceipt extends NsaBaseEndpoint {
// schemaCheck(NsaSimpleApiKey retkey, int arrayFlag,JSONObject
// jsonObject, String vesVersion, FileReader fr, DrumlinRequestContext
// ctx, UUID uuid) throws JSONException, QueueFullException, IOException
+ Boolean flag = true;
NsaSimpleApiKey retkey = null;
int arrayFlag = 0;
@@ -114,12 +115,35 @@ public class TestEventReceipt extends NsaBaseEndpoint {
UUID uuid = UUID.randomUUID();
try {
- EventReceipt.schemaCheck(retkey, arrayFlag, jsonObject, vesVersion, ctx, uuid);
+ flag = EventReceipt.schemaCheck(retkey, arrayFlag, jsonObject, vesVersion, ctx, uuid);
} catch (NullPointerException |JSONException | QueueFullException | IOException e) {
Log.debug("Response object creation failure");
}
- assertEquals(true, true);
+ assertEquals(true, flag);
+ }
+
+ @Test
+ public void testgetUser() {
+
+
+ Boolean flag = true;
+ String user;
+
+ CommonStartup.authflag = 1;
+ CommonStartup.schemaValidatorflag = 1;
+
+ jsonObject = new org.json.JSONObject(ev);
+
+ DrumlinRequestContext ctx = null;
+
+ try {
+ user = EventReceipt.getUser(ctx);
+ } catch (NullPointerException |JSONException e) {
+
+ Log.debug("Response object creation failure");
+ }
+ assertEquals(true, flag);
}
@Test