diff options
author | Vijay VK <vv770d@att.com> | 2018-02-27 18:12:41 +0000 |
---|---|---|
committer | VENKATESH KUMAR <vv770d@att.com> | 2018-02-27 13:13:40 -0500 |
commit | e6cb4531f2dfd8c5e4e3b90c69891cca686142ee (patch) | |
tree | 1ece3a2d8124bc0d9df31f9a1c78a5b9ee651034 /src/test/java/org/onap/dcae/vestest/TestEventReceipt.java | |
parent | 8ead72e4a6b7b92e370d89fa2590ea21c2764428 (diff) |
Misc updates to collector
Change-Id: I7a3b52c454442d6a9f93331142b78bf671ffcd0a
Signed-off-by: VENKATESH KUMAR <vv770d@att.com>
Issue-ID: DCAEGEN2-373
Diffstat (limited to 'src/test/java/org/onap/dcae/vestest/TestEventReceipt.java')
-rw-r--r-- | src/test/java/org/onap/dcae/vestest/TestEventReceipt.java | 28 |
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
|