summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsawantmandar <ms5838@att.com>2019-03-08 14:57:05 -0600
committersawantmandar <ms5838@att.com>2019-03-08 14:58:43 -0600
commit4a8983cbc2b63c24c082efd163a32aa98e2820d8 (patch)
treef3cc8543e8928d99864781b0d9fb9a54b3fdab15
parent476a5d68e7ac96b9b993fadcf11a12685e93c36a (diff)
updating test cases for more coverage
Issue-ID: DMAAP-1082 Change-Id: I529634793afeefb32ad3e8dfe2b79e66bc6e2d5d Signed-off-by: sawantmandar <ms5838@att.com>
-rw-r--r--src/test/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandlerTest.java11
-rw-r--r--src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandlerTest.java15
2 files changed, 23 insertions, 3 deletions
diff --git a/src/test/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandlerTest.java b/src/test/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandlerTest.java
index 044c1a1..c3a0bb1 100644
--- a/src/test/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandlerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/dme/client/HeaderReplyHandlerTest.java
@@ -22,11 +22,15 @@ package org.onap.dmaap.mr.dme.client;
import static org.junit.Assert.assertTrue;
+import java.util.HashMap;
+import java.util.Map;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import com.att.aft.dme2.api.util.DME2ExchangeResponseContext;
+
public class HeaderReplyHandlerTest {
private HeaderReplyHandler handler = null;
@@ -59,8 +63,13 @@ public class HeaderReplyHandlerTest {
@Test
public void testHandleReply() {
+
+ Map <String, String>responseHeaders = new HashMap<String, String>();
+ responseHeaders.put("transactionId", "1234");
- handler.handleReply(null);
+ DME2ExchangeResponseContext responseData = new DME2ExchangeResponseContext ("service",
+ 200, new HashMap <String, String>(), responseHeaders, "routeOffer", "1.0.0", "http://");
+ handler.handleReply(responseData);
assertTrue(true);
}
diff --git a/src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandlerTest.java b/src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandlerTest.java
index c8d7f64..9d3292e 100644
--- a/src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandlerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/dme/client/PreferredRouteReplyHandlerTest.java
@@ -20,10 +20,15 @@
package org.onap.dmaap.mr.dme.client;
+import java.util.HashMap;
+import java.util.Map;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import com.att.aft.dme2.api.util.DME2ExchangeResponseContext;
+
public class PreferredRouteReplyHandlerTest {
private PreferredRouteReplyHandler handler = null;
@@ -40,9 +45,15 @@ public class PreferredRouteReplyHandlerTest {
@Test
public void testHandleReply() {
+
+ Map <String, String> responseHeaders = new HashMap <String, String>();
+ responseHeaders.put("transactionId", "1234");
+
+ DME2ExchangeResponseContext responseData = new DME2ExchangeResponseContext ("service",
+ 200, new HashMap<String, String>(), responseHeaders, "routeOffer", "1.0.0", "http://");
-// handler.handleReply(null);
-// assertTrue(true);
+ handler.handleReply(responseData);
+ assert(true);
}