summaryrefslogtreecommitdiffstats
path: root/message-router/publisher/sample.client
diff options
context:
space:
mode:
authorSmokowski, Kevin (ks6305) <kevin.smokowski@att.com>2019-07-26 20:24:59 +0000
committerKevin Smokowski <kevin.smokowski@att.com>2019-07-26 21:03:10 +0000
commitdd48a8a5083e3a65c8b47ce45ce7517afc47c1ff (patch)
tree7b774e48531e16a703ac1a901e1437ad8c9c7907 /message-router/publisher/sample.client
parent145a984ea7b2376e1d187ca0ad9ff0b62e7adae0 (diff)
Improve code coverage in sli adaptors
increase code coverage in message router in sli adaptors Issue-ID: CCSDK-1548 Signed-off-by: Smokowski, Kevin (ks6305) <kevin.smokowski@att.com> Change-Id: I64f0e025a759b219ce4c7e017b500952d1c7f30b
Diffstat (limited to 'message-router/publisher/sample.client')
-rw-r--r--message-router/publisher/sample.client/src/test/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/client/impl/ClientImplTest.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/message-router/publisher/sample.client/src/test/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/client/impl/ClientImplTest.java b/message-router/publisher/sample.client/src/test/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/client/impl/ClientImplTest.java
new file mode 100644
index 000000000..82a1566c3
--- /dev/null
+++ b/message-router/publisher/sample.client/src/test/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/client/impl/ClientImplTest.java
@@ -0,0 +1,29 @@
+package org.onap.ccsdk.sli.adaptors.messagerouter.publisher.client.impl;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.ccsdk.sli.adaptors.messagerouter.publisher.api.PublisherApi;
+
+public class ClientImplTest {
+
+ @Test
+ public void testSetTopic() {
+ ClientImpl impl = new ClientImpl();
+ String myTopic = "stock updates";
+ impl.setTopic(myTopic);
+
+ PublisherApi publisherImpl = new PublisherApi() {
+
+ @Override
+ public Boolean publish(String topic, String body) {
+ assertEquals(myTopic,topic);
+ return true;
+ }
+
+ };
+ impl.setPublisher(publisherImpl);
+ impl.init();
+ }
+
+}