예제 #1
0
        public void Can_clone_DtoWithArrayList()
        {
            var expected = new DtoWithArrayList() { Values = new ArrayList() };
            expected.Values.Add("foo");
            var clone = Incubator.Clone(expected);

            Assert.AreNotSame(expected, clone);
            Assert.AreNotSame(expected.Values, clone.Values);
            Assert.AreEqual(expected.Values.ToArray(), clone.Values.ToArray());
        }
예제 #2
0
        public void Can_clone_DtoWithArrayList()
        {
            var expected = new DtoWithArrayList()
            {
                Values = new ArrayList()
            };

            expected.Values.Add("foo");
            var clone = Incubator.Clone(expected);

            Assert.AreNotSame(expected, clone);
            Assert.AreNotSame(expected.Values, clone.Values);
            Assert.AreEqual(expected.Values.ToArray(), clone.Values.ToArray());
        }