Search in sources :

Example 1 with KafkaApplicationClient

use of org.eclipse.hono.application.client.kafka.KafkaApplicationClient in project hono by eclipse.

the class ReceiverTest method clientFactoryVariants.

private static Stream<ApplicationClient<? extends MessageContext>> clientFactoryVariants() {
    final AmqpApplicationClient amqpApplicationClientFactory = mock(AmqpApplicationClient.class);
    when(amqpApplicationClientFactory.connect()).thenReturn(Future.succeededFuture());
    when(amqpApplicationClientFactory.createTelemetryConsumer(anyString(), VertxMockSupport.anyHandler(), VertxMockSupport.anyHandler())).thenReturn(Future.succeededFuture(mock(MessageConsumer.class)));
    when(amqpApplicationClientFactory.createEventConsumer(anyString(), VertxMockSupport.anyHandler(), VertxMockSupport.anyHandler())).thenReturn(Future.succeededFuture(mock(MessageConsumer.class)));
    final KafkaApplicationClient kafkaApplicationClientFactory = mock(KafkaApplicationClient.class);
    when(kafkaApplicationClientFactory.createTelemetryConsumer(anyString(), VertxMockSupport.anyHandler(), VertxMockSupport.anyHandler())).thenReturn(Future.succeededFuture(mock(MessageConsumer.class)));
    when(kafkaApplicationClientFactory.createEventConsumer(anyString(), VertxMockSupport.anyHandler(), VertxMockSupport.anyHandler())).thenReturn(Future.succeededFuture(mock(MessageConsumer.class)));
    return Stream.of(amqpApplicationClientFactory, kafkaApplicationClientFactory);
}
Also used : AmqpApplicationClient(org.eclipse.hono.application.client.amqp.AmqpApplicationClient) KafkaApplicationClient(org.eclipse.hono.application.client.kafka.KafkaApplicationClient)

Aggregations

AmqpApplicationClient (org.eclipse.hono.application.client.amqp.AmqpApplicationClient)1 KafkaApplicationClient (org.eclipse.hono.application.client.kafka.KafkaApplicationClient)1