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()); }
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()); }
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()); }