Exemple #1
0
        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());
        }
Exemple #2
0
        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());
        }