Browse Source

Fix Unit Tests.

release/3.x.x
Christian Kratky 4 years ago
parent
commit
4514348821
4 changed files with 11 additions and 3 deletions
  1. +1
    -1
      Source/MQTTnet/Diagnostics/MqttNetLogMessage.cs
  2. +8
    -2
      Tests/MQTTnet.Core.Tests/Mockups/TestEnvironment.cs
  3. +1
    -0
      Tests/MQTTnet.Core.Tests/Mockups/TestServerWrapper.cs
  4. +1
    -0
      Tests/MQTTnet.Core.Tests/Server_Tests.cs

+ 1
- 1
Source/MQTTnet/Diagnostics/MqttNetLogMessage.cs View File

@@ -2,7 +2,7 @@

namespace MQTTnet.Diagnostics
{
public class MqttNetLogMessage
public sealed class MqttNetLogMessage
{
public string LogId { get; set; }



+ 8
- 2
Tests/MQTTnet.Core.Tests/Mockups/TestEnvironment.cs View File

@@ -46,7 +46,10 @@ namespace MQTTnet.Tests.Mockups

ServerLogger.LogMessagePublished += (s, e) =>
{
Debug.WriteLine(e.LogMessage.ToString());
if (Debugger.IsAttached)
{
Debug.WriteLine(e.LogMessage.ToString());
}

if (e.LogMessage.Level == MqttNetLogLevel.Error)
{
@@ -59,7 +62,10 @@ namespace MQTTnet.Tests.Mockups

ClientLogger.LogMessagePublished += (s, e) =>
{
Debug.WriteLine(e.LogMessage.ToString());
if (Debugger.IsAttached)
{
Debug.WriteLine(e.LogMessage.ToString());
}

if (e.LogMessage.Level == MqttNetLogLevel.Error)
{


+ 1
- 0
Tests/MQTTnet.Core.Tests/Mockups/TestServerWrapper.cs View File

@@ -135,6 +135,7 @@ namespace MQTTnet.Tests.Mockups

public void Dispose()
{
Implementation.Dispose();
}
}
}

+ 1
- 0
Tests/MQTTnet.Core.Tests/Server_Tests.cs View File

@@ -15,6 +15,7 @@ using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using MQTTnet.Diagnostics;
using MQTTnet.Formatter;

namespace MQTTnet.Tests


Loading…
Cancel
Save