Class MqttTestingHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Silverback.Testing
Assembly: Silverback.Integration.MQTT.Testing.dll
Syntax
public class MqttTestingHelper : TestingHelper<MqttBroker>, IMqttTestingHelper, ITestingHelper<MqttBroker>
Constructors
| Improve this doc View sourceMqttTestingHelper(IServiceProvider, ILogger<MqttTestingHelper>)
Initializes a new instance of the MqttTestingHelper class.
Declaration
public MqttTestingHelper(IServiceProvider serviceProvider, ILogger<MqttTestingHelper> logger)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | serviceProvider | The System.IServiceProvider. |
Microsoft.Extensions.Logging.ILogger<MqttTestingHelper> | logger | The ISilverbackLogger. |
Methods
| Improve this doc View sourceGetClientSession(String)
Declaration
public IClientSession GetClientSession(string clientId)
Parameters
Type | Name | Description |
---|---|---|
System.String | clientId |
Returns
Type | Description |
---|---|
IClientSession |
GetMessages(String)
Declaration
public IReadOnlyList<MqttApplicationMessage> GetMessages(string topic)
Parameters
Type | Name | Description |
---|---|---|
System.String | topic |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<MQTTnet.MqttApplicationMessage> |
WaitUntilAllMessagesAreConsumedAsync(Boolean, Nullable<TimeSpan>)
Declaration
public override async Task WaitUntilAllMessagesAreConsumedAsync(bool throwTimeoutException, TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | throwTimeoutException | |
System.Nullable<System.TimeSpan> | timeout |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Silverback.Testing.TestingHelper<Silverback.Messaging.Broker.MqttBroker>.WaitUntilAllMessagesAreConsumedAsync(System.Boolean, System.Nullable<System.TimeSpan>)