Exemplo n.º 1
0
        public void CompareNullablePropertiesSameType(bool date1Null, bool date2Null)
        {
            //Arrange.
            PersonEx2WithPropertyMap p1 = ModelsHelper.CreatePersonEx2WithPropertyMap(date1Null);
            PersonEx2      p2           = ModelsHelper.CreatePersonEx2(date2Null);
            ObjectComparer comparer     = ObjectComparer.Create <PersonEx2WithPropertyMap, PersonEx2>();

            //Act.
            var result = comparer.Compare(p1, p2, out bool _);

            //Assert.
            result.Should().NotBeNull();
            PropertyComparisonResult propResult = result[nameof(PersonEx2WithPropertyMap.DateOfBirth)];

            propResult.Should().NotBeNull();
        }