blob: 82a1566c3ed372e6293fd3c7a9655eb25472871d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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();
}
}
|