Search in sources :

Example 1 with SubscriptionStore

use of org.apache.rocketmq.iot.storage.subscription.SubscriptionStore in project rocketmq-externals by apache.

the class AbstractMqttMessageHandlerTest method setup.

@Before
public void setup() {
    subscriptionStore = Mockito.mock(SubscriptionStore.class);
    clientManager = Mockito.mock(ClientManager.class);
    client = Mockito.spy(new MqttClient());
    initMessageHandler();
    mockHandler = new MockHandler(messageHandler);
    embeddedChannel = new EmbeddedChannel(mockHandler);
    initMessage();
    mock();
    Mockito.when(client.getCtx()).thenReturn(embeddedChannel.pipeline().context(mockHandler));
}
Also used : MqttClient(org.apache.rocketmq.iot.protocol.mqtt.data.MqttClient) SubscriptionStore(org.apache.rocketmq.iot.storage.subscription.SubscriptionStore) ClientManager(org.apache.rocketmq.iot.connection.client.ClientManager) EmbeddedChannel(io.netty.channel.embedded.EmbeddedChannel) Before(org.junit.Before)

Aggregations

EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)1 ClientManager (org.apache.rocketmq.iot.connection.client.ClientManager)1 MqttClient (org.apache.rocketmq.iot.protocol.mqtt.data.MqttClient)1 SubscriptionStore (org.apache.rocketmq.iot.storage.subscription.SubscriptionStore)1 Before (org.junit.Before)1