public void TestSerializerShouldSupportNulls()
        {
            var nestor = new Nestor();
            var clone  = Serializer.Clone(nestor);

            Assert.IsNull(clone.nesty);
            Assert.IsNull(clone.Nesty2);
        }
        public void TestSerializerSupportForNestedObjects()
        {
            var nestor = new Nestor();

            nestor.nesty = new Nesty()
            {
                i = 99
            };
            nestor.Nesty2 = new Nesty()
            {
                i = 100
            };

            var clone = Serializer.Clone(nestor);

            Assert.AreEqual(99, clone.nesty.i);
            Assert.AreEqual(100, clone.Nesty2.i);
        }
示例#3
0
        public void TestSerializerSupportForNestedObjects()
        {
            var nestor = new Nestor
            {
                nesty = new Nesty()
                {
                    i = 99
                },
                Nesty2 = new Nesty()
                {
                    i = 100
                }
            };

            var clone = Serializer.DeepClone(nestor);

            Assert.Equal(99, clone.nesty.i);
            Assert.Equal(100, clone.Nesty2.i);
        }
        public void TestSerializerSupportForNestedObjects()
        {
            var nestor = new Nestor();
            nestor.nesty = new Nesty() {i = 99};
            nestor.Nesty2 = new Nesty() {i = 100};

            var clone = Serializer.Clone(nestor);

            Assert.AreEqual(99, clone.nesty.i);
            Assert.AreEqual(100, clone.Nesty2.i);
        }
 public void TestSerializerShouldSupportNulls()
 {
     var nestor = new Nestor();
     var clone = Serializer.Clone(nestor);
     Assert.IsNull(clone.nesty);
     Assert.IsNull(clone.Nesty2);
 }