Esempio n. 1
0
        public void TestIPAddess()
        {
            WithIP obj = new WithIP { Address = IPAddress.Parse("100.90.80.100") },
                clone = Serializer.DeepClone(obj);

            Assert.AreEqual(obj.Address, clone.Address);

            obj.Address = null;
            clone = Serializer.DeepClone(obj);

            Assert.IsNull(obj.Address, "obj");
            Assert.IsNull(clone.Address, "clone");

        }
Esempio n. 2
0
        public void TestIPAddess()
        {
            WithIP obj = new WithIP {
                Address = IPAddress.Parse("100.90.80.100")
            },
                   clone = Serializer.DeepClone(obj);

            Assert.AreEqual(obj.Address, clone.Address);

            obj.Address = null;
            clone       = Serializer.DeepClone(obj);

            Assert.IsNull(obj.Address, "obj");
            Assert.IsNull(clone.Address, "clone");
        }
Esempio n. 3
0
        static void Test(TypeModel model)
        {
            WithIP obj = new WithIP {
                Address = IPAddress.Parse("100.90.80.100")
            },
                   clone = (WithIP)model.DeepClone(obj);

            Assert.Equal(obj.Address, clone.Address);

            obj.Address = null;
            clone       = (WithIP)model.DeepClone(obj);

            Assert.Null(obj.Address);   //, "obj");
            Assert.Null(clone.Address); //, "clone");
        }
Esempio n. 4
0
        public void TestIPAddess()
        {
            var model = TypeModel.Create();
            model.AllowParseableTypes = true;
            WithIP obj = new WithIP { Address = IPAddress.Parse("100.90.80.100") },
                clone = (WithIP) model.DeepClone(obj);

            Assert.AreEqual(obj.Address, clone.Address);

            obj.Address = null;
            clone = (WithIP)model.DeepClone(obj);

            Assert.IsNull(obj.Address, "obj");
            Assert.IsNull(clone.Address, "clone");

        }
Esempio n. 5
0
        public void TestIPAddess()
        {
            var model = TypeModel.Create();

            model.AllowParseableTypes = true;
            WithIP obj = new WithIP {
                Address = IPAddress.Parse("100.90.80.100")
            },
                   clone = (WithIP)model.DeepClone(obj);

            Assert.AreEqual(obj.Address, clone.Address);

            obj.Address = null;
            clone       = (WithIP)model.DeepClone(obj);

            Assert.IsNull(obj.Address, "obj");
            Assert.IsNull(clone.Address, "clone");
        }