Exemple #1
0
        public void CloneTest()
        {
            var obj = new ModelClass()
            {
                Property     = 12,
                PropertyLink = "asd"
            };

            var cobj = (ModelClass)obj.Clone();

            cobj.PropertyLink += "aa";
            cobj.Property     += 2;


            Assert.AreEqual(obj.Property, 12, $"cobj.Pv:{cobj.Property}");
            Assert.AreEqual(cobj.Property, 14, $"obj.Pv:{obj.Property}");

            Assert.AreEqual(obj.PropertyLink, "asd", $"cobj.Pl:{cobj.PropertyLink}");
            Assert.AreEqual(cobj.PropertyLink, "asdaa", $"obj.Pl:{obj.PropertyLink}");
        }