예제 #1
0
        public void TestCloneGen()
        {
            Assert.AreEqual(28076, SamplePerson.Counter);
            var cl  = new ClonerGen();
            var dst = cl.Deep(person);

            Assert.AreEqual(person.Children.Count, dst.Children.Count);
        }
예제 #2
0
        public void TestCloneLongListInt()
        {
            var list1 = new SampleMatrix {
                M = new List <List <int> >()
            };

            for (int i = 0; i < 1000; ++i)
            {
                list1.M.Add(new List <int>());
                for (int j = 0; j < 400; ++j)
                {
                    list1.M[i].Add(i * j * 97);
                }
            }
            var list2 = new ClonerGen().Deep(list1);

            Assert.AreEqual(list1.M.Count, list2.M.Count);
        }