Ejemplo n.º 1
0
        public void Can_clone_DtoWithValueCollection()
        {
            var expected = new DtoWithValueCollection()
            {
                Values = new[] { 1, 2, 3 }
            };
            var clone = Incubator.Clone(expected);

            Assert.AreNotSame(expected, clone);
            Assert.AreNotSame(expected.Values, clone.Values);
            Assert.AreEqual(expected.Values.ToArray(), clone.Values.ToArray());
        }
Ejemplo n.º 2
0
        public void Can_clone_DtoWithValueCollection2()
        {
            var expected = new DtoWithValueCollection()
            {
                Values = new List <int>()
            };

            expected.Values.Add(1);
            expected.Values.Add(2);
            expected.Values.Add(3);
            var clone = Incubator.Clone(expected);

            Assert.AreNotSame(expected, clone);
            Assert.AreNotSame(expected.Values, clone.Values);
            Assert.AreEqual(expected.Values.ToArray(), clone.Values.ToArray());
        }
Ejemplo n.º 3
0
        public void Can_clone_DtoWithValueCollection2()
        {
            var expected = new DtoWithValueCollection() { Values = new List<int>() };
            expected.Values.Add(1);
            expected.Values.Add(2);
            expected.Values.Add(3);
            var clone = Incubator.Clone(expected);

            Assert.AreNotSame(expected, clone);
            Assert.AreNotSame(expected.Values, clone.Values);
            Assert.AreEqual(expected.Values.ToArray(), clone.Values.ToArray());
        }
Ejemplo n.º 4
0
        public void Can_clone_DtoWithValueCollection()
        {
            var expected = new DtoWithValueCollection() { Values = new[] { 1, 2, 3 } };
            var clone = Incubator.Clone(expected);

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