Example #1
0
 public void Read_ShouldHandleInt64()
 {
     var message = new Test1Ex64();
     message.A= 0x7f00000080000000;
     Assert.AreEqual(0x7f00000080000000,
         MessageReader.Read<Test1Ex64>(MessageWriter.Write(message)).A);
 }
Example #2
0
 public void WriteMessage_Test1Ex64SimpleMessage()
 {
     var output = new MemoryStream();
     var message = new Test1Ex64();
     message.A = 150;
     Serializer.Serialize(output, message);
     Assert.AreEqual(EncodingTests.SimpleMessage, output.ToArray());
 }
Example #3
0
 public void Read_ShouldDiscardExtraBytesForVarint32()
 {
     var message = new Test1Ex64();
     message.A = 0x7000000000000042;
     Assert.AreEqual((int)message.A,
         MessageReader.Read<Test1>(MessageWriter.Write(message)).A);
 }