diff options
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.java | 29 |
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();
+ }
+
+}
|