Переглянути джерело

Fix breaking changes.

release/3.x.x
Christian Kratky 5 роки тому
джерело
коміт
7ed5580352
1 змінених файлів з 3 додано та 2 видалено
  1. +3
    -2
      Tests/MQTTnet.Core.Tests/ManagedMqttClientTests.cs

+ 3
- 2
Tests/MQTTnet.Core.Tests/ManagedMqttClientTests.cs Переглянути файл

@@ -2,6 +2,7 @@
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MQTTnet.Client;
using MQTTnet.Client.Connecting;
using MQTTnet.Client.Options;
using MQTTnet.Diagnostics;
using MQTTnet.Extensions.ManagedClient;
@@ -70,7 +71,7 @@ namespace MQTTnet.Tests
var recievingClient = await testEnvironment.ConnectClientAsync();
await recievingClient.SubscribeAsync("My/last/will");

recievingClient.UseReceivedApplicationMessageHandler(context => Interlocked.Increment(ref receivedMessagesCount));
recievingClient.UseApplicationMessageReceivedHandler(context => Interlocked.Increment(ref receivedMessagesCount));

dyingManagedClient.Dispose();

@@ -94,7 +95,7 @@ namespace MQTTnet.Tests
.WithTcpServer("localhost", testEnvironment.ServerPort);

TaskCompletionSource<bool> connected = new TaskCompletionSource<bool>();
managedClient.Connected += (s, e) => { connected.SetResult(true); };
managedClient.ConnectedHandler = new MqttClientConnectedHandlerDelegate(e => { connected.SetResult(true);});

await managedClient.StartAsync(new ManagedMqttClientOptionsBuilder()
.WithClientOptions(clientOptions)


Завантаження…
Відмінити
Зберегти