public void Deserialization() { var serializer = new BinarySerializer(DataSerialized); Assert.AreEqual(true, serializer.GetBool()); Assert.AreEqual((byte)0, serializer.GetByte()); Assert.AreEqual((byte)1, serializer.GetByte()); Assert.AreEqual('b', serializer.GetChar()); Assert.AreEqual((byte)0, serializer.GetByte()); Assert.AreEqual(1d, serializer.GetDouble()); Assert.AreEqual(1d, serializer.GetDouble()); Assert.AreEqual((short)-5, serializer.GetInt16()); Assert.AreEqual(-6, serializer.GetInt32()); Assert.AreEqual(7L, serializer.GetInt64()); Assert.AreEqual((sbyte)-2, serializer.GetSByte()); Assert.AreEqual(1f, serializer.GetFloat()); Assert.AreEqual((ushort)9, serializer.GetUInt16()); Assert.AreEqual(10U, serializer.GetUInt32()); Assert.AreEqual(11UL, serializer.GetUInt64()); Assert.AreEqual(new Version(1, 2, 3, 4), serializer.GetVersion()); }