aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
diff options
context:
space:
mode:
authorSunil Unnava <su622b@att.com>2018-03-06 11:41:18 -0500
committerSunil Unnava <su622b@att.com>2018-03-06 11:48:56 -0500
commit173a07c146746f85c17f2d58f2ded84b99818f9a (patch)
treeb7e57e93665f62e4987fedf15177cf587482f999 /src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
parentfa39dc549397b12c23096bf003b3d24016cfdd44 (diff)
testcases for code coverage
Issue-ID: DMAAP-271 Change-Id: I9b11a61d1098598f8dc6c687a10ebf765128d977 Signed-off-by: Sunil Unnava <su622b@att.com>
Diffstat (limited to 'src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java')
-rw-r--r--src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java b/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
index 86057c4..bfac947 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
+++ b/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
@@ -23,11 +23,13 @@ package com.att.nsa.mr.client.impl;
import java.io.IOException;
import java.util.LinkedList;
+import java.util.Properties;
import junit.framework.TestCase;
import org.junit.Test;
+import com.att.nsa.mr.client.MRClientFactory;
import com.att.nsa.mr.client.impl.MRConstants;
import com.att.nsa.mr.client.impl.MRConsumerImpl;
@@ -92,4 +94,19 @@ public class MRConsumerImplTest extends TestCase
final String url = c.createUrlPath (MRConstants.makeConsumerUrl ( "localhost:8080", "topic", "cg", "cid","http" ), -1, -1 );
assertEquals ( "http://localhost:8080/events/" + "topic/cg/cid?filter=%7B+%22foo%22%3D%22bar%22bar%22+%7D", url );
}
+
+ @Test
+ public void testFetchWithReturnConsumerResponse () throws IOException
+ {
+ final LinkedList<String> hosts = new LinkedList<String> ();
+ hosts.add ( "localhost:8080" );
+ Properties properties = new Properties();
+ properties.load(MRSimplerBatchConsumerTest.class.getClassLoader().getResourceAsStream("dme2/consumer.properties"));
+
+ final MRConsumerImpl c = new MRConsumerImpl ( hosts, "topic", "cg", "cid", -1, -1, "{ \"foo\"=\"bar\"bar\" }", null, null );
+ c.fetchWithReturnConsumerResponse();
+ c.setProtocolFlag("HTTPAAF");
+ c.fetchWithReturnConsumerResponse();
+ assertTrue(true);
+ }
}