示例#1
0
        public void Merger_NeverOverwriteNullMergeCriteria_DoesntOverwriteWithNulls()
        {
            var    sequence         = SequencedComplexItemBuilder.GetNewNullValueSequence();
            string mergeCriteriaKey = BreadcrumbHelper <SequencedComplexItem> .Of(s => s.StringValue);

            var neverOverwriteNullCriteria = new NeverOverwriteOldWithNull(mergeCriteriaKey);
            var nonDefaultMergeCriteria    = new List <IMergeCriteria>(new[] { neverOverwriteNullCriteria });

            var mergedValue = (SequencedComplexItem)_merger.Merge(sequence, nonDefaultMergeCriteria: nonDefaultMergeCriteria);

            Assert.AreEqual(sequence[0].StringValue, mergedValue.StringValue);
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SequencedComplexItemStringValueMergeCriteria_NeverOverwriteSequenceID1"/> class.
 /// </summary>
 public SequencedComplexItemStringValueMergeCriteria_NeverOverwriteSequenceID1()
 {
     // this class has a very specific target class/property
     ActivateAt = BreadcrumbHelper <SequencedComplexItem> .Of(s => s.StringValue);
 }