Ejemplo 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");

        }
Ejemplo 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");
        }
Ejemplo 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");
        }
Ejemplo 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");

        }
Ejemplo 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");
        }