summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-07-31 17:17:33 +0530
committerTakamune Cho <tc012c@att.com>2018-07-31 20:01:03 +0000
commit212f0917592ed112009e1827fb15c6adb8153636 (patch)
tree29555d72a0684f0428342f05c108031941f36964
parentde3e4d51c325df66a9a34ac7530bb75d067ba7db (diff)
added test cases to TestMessages.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: I230ad0e38a1507e0619d490a3786b97fa6d5db32 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java b/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java
index 997fb6dc6..2462e517e 100644
--- a/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java
+++ b/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java
@@ -6,6 +6,8 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
+ * Modification Copyright (C) 2018 IBM.
+ * =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -23,6 +25,7 @@
package org.onap.appc.listener.demo.model;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -87,12 +90,26 @@ public class TestMessages {
assertNotNull(out.getStatus().getValue());
}
+
+ @Test
+ public void testGetRequest()
+ {
+ String request="testRequest";
+ in.setRequest(request);
+ assertEquals(request, in.getRequest());
+ }
+
+ @Test
+ public void testIsValid()
+ {
+ assertEquals(true, in.isValid());
+ }
@Test
@Ignore
public void testIncommingToOutgoing(){
- OutgoingMessage newOut;
- newOut = Mapper.mapOne(in.toOutgoing(Status.ACCEPTED), OutgoingMessage.class);
+ OutgoingMessage newOut;
+ newOut = Mapper.mapOne(in.toOutgoing(Status.ACCEPTED), OutgoingMessage.class);
assertNotNull(newOut);
assertNotNull(newOut.getHeader().getApiVer());
assertNotNull(newOut.getHeader().getOriginatorId());