Migrate retained messages to the event based approach.

This commit is contained in:
Christian
2021-11-01 11:20:46 +01:00
parent 9ab85b3592
commit 22ccdf10c6
57 changed files with 451 additions and 666 deletions
@@ -1,17 +1,14 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MQTTnet.Client;
using MQTTnet.Formatter;
using MQTTnet.Tests.Mockups;
using System.Threading;
using System.Threading.Tasks;
namespace MQTTnet.Tests.MQTTv5
{
[TestClass]
public class Server_Tests : BaseTestClass
public sealed class Server_Tests : BaseTestClass
{
public TestContext TestContext { get; set; }
[TestMethod]
public async Task Will_Message_Send()
{
@@ -46,7 +43,7 @@ namespace MQTTnet.Tests.MQTTv5
[TestMethod]
public async Task Validate_IsSessionPresent()
{
using (var testEnvironment = new TestEnvironment(TestContext))
using (var testEnvironment = CreateTestEnvironment())
{
// Create server with persistent sessions enabled
@@ -84,7 +81,6 @@ namespace MQTTnet.Tests.MQTTv5
.WithClientId(ClientId)
.Build();
var result = await client2.ConnectAsync(options).ConfigureAwait(false);
await client2.DisconnectAsync();