Example #1
0
        public void TestPartial()
        {
            PartialData orig = new PartialData {
                Name = "abcdefghijklmnopqrstuvwxyz",
                Number = 1234,
                When = new DateTime(2008,1,1),
                HowMuchNotSerialized = 123.456M
            },  clone = Serializer.DeepClone(orig);

            Assert.IsNotNull(orig, "original");
            Assert.IsNotNull(clone, "clone");
            Assert.AreEqual(orig.Name, clone.Name, "name");
            Assert.AreEqual(orig.Number, clone.Number, "number");
            Assert.AreEqual(orig.When, clone.When, "when");
            Assert.AreEqual(0.0M, clone.HowMuchNotSerialized, "how much");
        }
Example #2
0
        public void TestPartial()
        {
            PartialData orig = new PartialData {
                Name   = "abcdefghijklmnopqrstuvwxyz",
                Number = 1234,
                When   = new DateTime(2008, 1, 1),
                HowMuchNotSerialized = 123.456M
            }, clone = Serializer.DeepClone(orig);

            Assert.IsNotNull(orig, "original");
            Assert.IsNotNull(clone, "clone");
            Assert.AreEqual(orig.Name, clone.Name, "name");
            Assert.AreEqual(orig.Number, clone.Number, "number");
            Assert.AreEqual(orig.When, clone.When, "when");
            Assert.AreEqual(0.0M, clone.HowMuchNotSerialized, "how much");
        }