コード例 #1
0
        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);
        }
コード例 #2
0
 public ClassWithIsNotMergeableSubClass(NotMergeableSubClass notMergeableSubClass)
 {
     NotMergeableSubClass = notMergeableSubClass;
 }