Table of Contents

Interface IMqttTestingHelper

Namespace
Silverback.Testing
Assembly
Silverback.Integration.MQTT.Testing.dll

Exposes some helper methods and shortcuts to simplify testing.

public interface IMqttTestingHelper : ITestingHelper
Inherited Members

Methods

GetClientSession(string)

Gets the IClientSession of the specified client.

IClientSession GetClientSession(string clientId)

Parameters

clientId string

The client id.

Returns

IClientSession

The IClientSession.

Remarks

GetMessages(string)

Gets the messages that have been published to the specified topic.

IReadOnlyList<MqttApplicationMessage> GetMessages(string topic)

Parameters

topic string

The topic.

Returns

IReadOnlyList<MqttApplicationMessage>

The messages published to the topic.

Remarks

GetProducer(Action<MqttClientConfigurationBuilder>)

Gets a new producer with the specified configuration.

IProducer GetProducer(Action<MqttClientConfigurationBuilder> configurationBuilderAction)

Parameters

configurationBuilderAction Action<MqttClientConfigurationBuilder>

An Action<T> that takes the MqttClientConfigurationBuilder and configures it.

Returns

IProducer

The IProducer.