Ejemplo n.º 1
0
        public void SerializeDeserialize_SerializeAndDeserializeFixed8AsTheSameValue()
        {
            var memoryByteArray = new byte[255];
            var actual          = new Fixed8(1000);
            var afterReadFixed8 = new Fixed8();

            using (var writer = new BinaryWriter(new MemoryStream(memoryByteArray)))
            {
                actual.Serialize(writer);
            }

            using (var reader = new BinaryReader(new MemoryStream(memoryByteArray)))
            {
                afterReadFixed8.Deserialize(reader);
            }

            Asserting
            .That(actual)
            .IsEqual(afterReadFixed8);
        }