Пример #1
0
 public void CorrectMessageShouldParseSuccessfully()
 {
     var message = new ClientUnicastEx();
     message.Read(new byte[] {
         0x3
     });
 }
Пример #2
0
 public void InvalidMethodLengthShouldThrow()
 {
     var message = new ClientUnicastEx();
     Assert.Throws<InvalidMessageLengthException>(() => message.Read(new byte[0]));
     Assert.Throws<InvalidMessageLengthException>(() => message.Read(new byte[] {
         0x3, 0x2
     }));
 }
Пример #3
0
 public void InvalidTypeShouldThrow()
 {
     var message = new ClientUnicastEx();
     Assert.Throws<InvalidMessageException>(() => message.Read(new byte[] { 0x99 }));
 }