public void TestSerialize() { TestObject testObject = TestObject.GetTestObject(); TestObject.Map map = new TestObject.Map(); ProfileSerializer.Default.RegisterProfile(map); MemoryStream stream = new MemoryStream(); ProfileSerializer.Default.Serialize(stream, testObject); byte[] debug = stream.ToArray(); }
public void TestDeserialize() { TestObject testObject = TestObject.GetTestObject(); TestObject.Map map = new TestObject.Map(); ProfileSerializer.Default.RegisterProfile(map); MemoryStream stream = new MemoryStream(); ProfileSerializer.Default.Serialize(stream, testObject); stream.Seek(0, SeekOrigin.Begin); TestObject deserialized = new TestObject(); ProfileSerializer.Default.Deserialize(stream, deserialized); Assert.Equal(200, deserialized.EmbededObjectA.EmbededObjectB.EmbededPropertyB); }