mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-17 01:33:03 +08:00
21 lines
575 B
C#
21 lines
575 B
C#
using System.IO;
|
|
using System.Threading;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using MQTTnet.Core.Internal;
|
|
using MQTTnet.Exceptions;
|
|
using MQTTnet.Serializer;
|
|
|
|
namespace MQTTnet.Core.Tests
|
|
{
|
|
[TestClass]
|
|
public class MqttPacketReaderTests
|
|
{
|
|
[TestMethod]
|
|
[ExpectedException(typeof(MqttCommunicationException))]
|
|
public void MqttPacketReader_EmptyStream()
|
|
{
|
|
MqttPacketReader.ReadFixedHeaderAsync(new TestMqttChannel(new MemoryStream()), CancellationToken.None).GetAwaiter().GetResult();
|
|
}
|
|
}
|
|
}
|