diff options
author | Rupinder <rupinsi1@in.ibm.com> | 2020-05-21 15:12:08 +0530 |
---|---|---|
committer | Rupinder <rupinsi1@in.ibm.com> | 2020-05-21 15:12:16 +0530 |
commit | c5a7332b4eb975fd0e50b5dfd80c1d655a246a9a (patch) | |
tree | 9fa0d99c0f4a4451faecb44fdcc28de5f99620d0 | |
parent | ebbbdfe1543809bc044781f3ce30e65d106e21d8 (diff) |
fixed some JUnits
Issue-ID: DMAAP-1415
Change-Id: I22386744f2d015bd7a9aeb1ee3a6aa47fcb475a2
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
3 files changed, 11 insertions, 2 deletions
diff --git a/src/test/java/org/onap/dmaap/mr/client/impl/MRMetaClientTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/MRMetaClientTest.java index 9d86d48..ea9cab4 100644 --- a/src/test/java/org/onap/dmaap/mr/client/impl/MRMetaClientTest.java +++ b/src/test/java/org/onap/dmaap/mr/client/impl/MRMetaClientTest.java @@ -27,6 +27,8 @@ import java.util.LinkedList; import java.util.Set; import org.junit.Before; import org.junit.Test; + +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import com.att.nsa.apiClient.http.HttpException; import com.att.nsa.apiClient.http.HttpObjectNotFoundException; @@ -60,6 +62,7 @@ public class MRMetaClientTest { } catch (IOException e) { e.printStackTrace(); } + assertNotNull(hosts); // assertEquals ("http://localhost:8080/events/" + "topic/cg/cid", url ); @@ -79,7 +82,8 @@ public class MRMetaClientTest { TopicInfo topicInfo=c.getTopicMetadata(topic); } catch (IOException | HttpObjectNotFoundException e) { e.printStackTrace(); - } + } + assertNotNull(topic); } @@ -95,6 +99,7 @@ public class MRMetaClientTest { } catch (IOException | HttpException e) { e.printStackTrace(); } + assertNotNull(hosts); } @Test public void testupdateApiKey(){ diff --git a/src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchConsumerTest.java b/src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchConsumerTest.java index 8c71f2f..af5ccd2 100644 --- a/src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchConsumerTest.java +++ b/src/test/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchConsumerTest.java @@ -31,6 +31,7 @@ import org.junit.Test; import org.onap.dmaap.mr.client.MRClientFactory; import org.onap.dmaap.mr.client.MRConsumer; +import static org.junit.Assert.assertNotNull; public class MRSimplerBatchConsumerTest { @@ -60,7 +61,8 @@ public class MRSimplerBatchConsumerTest { } } catch (Exception e) { System.err.println ( e.getClass().getName () + ": " + e.getMessage () ); - } + } + assertNotNull(cc); } 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 9d3292e..f0bc0b3 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 @@ -28,6 +28,7 @@ import org.junit.Before; import org.junit.Test; import com.att.aft.dme2.api.util.DME2ExchangeResponseContext; +import static org.junit.Assert.assertNotNull; public class PreferredRouteReplyHandlerTest { private PreferredRouteReplyHandler handler = null; @@ -54,6 +55,7 @@ public class PreferredRouteReplyHandlerTest { handler.handleReply(responseData); assert(true); + assertNotNull(responseHeaders); } |