You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MqttPacketReaderTests.cs 500 B

пре 7 година
пре 7 година
пре 7 година
12345678910111213141516171819
  1. using System.IO;
  2. using System.Threading;
  3. using Microsoft.VisualStudio.TestTools.UnitTesting;
  4. using MQTTnet.Serializer;
  5. namespace MQTTnet.Core.Tests
  6. {
  7. [TestClass]
  8. public class MqttPacketReaderTests
  9. {
  10. [TestMethod]
  11. public void MqttPacketReader_EmptyStream()
  12. {
  13. var header = MqttPacketReader.ReadHeaderAsync(new TestMqttChannel(new MemoryStream()), CancellationToken.None).GetAwaiter().GetResult();
  14. Assert.IsNull(header);
  15. }
  16. }
  17. }