public void Read_ShouldSupportFloat() { var message = new WithFixed32(); message.Float = 3.1415f; Assert.AreEqual(3.1415f, MessageReader.Read<WithFixed32>(MessageWriter.Write(message)).Float); }
public void WriteMessage_WithFixed32ShouldUseFiveBytesPerField() { var message = new WithFixed32(); Assert.AreEqual(5 * Message.CountFields(message), MessageWriter.Write(message).Length); }
public void Read_ShouldSupportFixedUInt32() { var message = new WithFixed32(); message.UInt32 = 0x80000001; Assert.AreEqual(0x80000001, MessageReader.Read<WithFixed32>(MessageWriter.Write(message)).UInt32); }