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.
 
 
 
 

21 line
575 B

  1. using System.IO;
  2. using System.Threading;
  3. using Microsoft.VisualStudio.TestTools.UnitTesting;
  4. using MQTTnet.Core.Internal;
  5. using MQTTnet.Exceptions;
  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. }