public void Serializ_And_Deserialize_Serializable_Class() { SerializableA a = new SerializableA(); a.PublicMember = 20; a.IncrementPrivateMember(); var i = a.IncrementPrivateMember(); Stream s = Serialize.SerializeToXmlStream(a); NonSerializableA copyOfA = (NonSerializableA)Serialize.DeserializeFromXmlStream(s, typeof(SerializableA)); Assert.AreEqual(a.PublicMember, copyOfA.PublicMember); i = a.IncrementPrivateMember(); var i_copy = copyOfA.IncrementPrivateMember(); Assert.AreEqual(i, i_copy); }
public void Serailaize_Serializable_Class_Test() { SerializableA a = new SerializableA(); a.PublicMember = 10; var incrementedPrivateMember = a.IncrementPrivateMember(); var stream = Serialize.SerializeToXmlStream(a); }