您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

21 行
570 B

  1. using System.IO;
  2. using System.Threading;
  3. using Microsoft.VisualStudio.TestTools.UnitTesting;
  4. using MQTTnet.Exceptions;
  5. using MQTTnet.Internal;
  6. using MQTTnet.Serializer;
  7. namespace MQTTnet.Core.Tests
  8. {
  9. [TestClass]
  10. public class MqttPacketReaderTests
  11. {
  12. [TestMethod]
  13. [ExpectedException(typeof(MqttCommunicationException))]
  14. public void MqttPacketReader_EmptyStream()
  15. {
  16. MqttPacketReader.ReadFixedHeaderAsync(new TestMqttChannel(new MemoryStream()), CancellationToken.None).GetAwaiter().GetResult();
  17. }
  18. }
  19. }