public void IsNotMergeableClassesShallBeCopiedAndNotMerged() { NotMergeableSubClass subClass1 = new NotMergeableSubClass(); NotMergeableSubClass subClass2 = new NotMergeableSubClass(); var a = new ClassWithIsNotMergeableSubClass(subClass1); var b = new ClassWithIsNotMergeableSubClass(subClass2); a = ObjectMerger.ObjectMerger.MergeObjects(a, b); Assert.AreEqual(subClass2, a.NotMergeableSubClass); Assert.AreNotEqual(subClass1, a.NotMergeableSubClass); }
public ClassWithIsNotMergeableSubClass(NotMergeableSubClass notMergeableSubClass) { NotMergeableSubClass = notMergeableSubClass; }