public void TestObjectSerialisation() { var thing0 = new SerialisationThing(0); var thing1 = new SerialisationThing(1); var thing3 = new SerialisationThing(3); Assert.AreEqual(GenericStructure.Serialise(thing0).ToString(), GenericStructure.Serialise(GenericStructure.Deserialise<SerialisationThing>(GenericStructure.Serialise(thing0))).ToString()); Assert.AreEqual(GenericStructure.Serialise(thing1).ToString(), GenericStructure.Serialise(GenericStructure.Deserialise<SerialisationThing>(GenericStructure.Serialise(thing1))).ToString()); Assert.AreEqual(GenericStructure.Serialise(thing3).ToString(), GenericStructure.Serialise(GenericStructure.Deserialise<SerialisationThing>(GenericStructure.Serialise(thing3))).ToString()); }
public void TestObjectSerialisation() { var thing0 = new SerialisationThing(0); var thing1 = new SerialisationThing(1); var thing3 = new SerialisationThing(3); Assert.AreEqual(GenericStructure.Serialise(thing0).ToString(), GenericStructure.Serialise(GenericStructure.Deserialise <SerialisationThing>(GenericStructure.Serialise(thing0))).ToString()); Assert.AreEqual(GenericStructure.Serialise(thing1).ToString(), GenericStructure.Serialise(GenericStructure.Deserialise <SerialisationThing>(GenericStructure.Serialise(thing1))).ToString()); Assert.AreEqual(GenericStructure.Serialise(thing3).ToString(), GenericStructure.Serialise(GenericStructure.Deserialise <SerialisationThing>(GenericStructure.Serialise(thing3))).ToString()); }