public void ShouldReturnByConvention() { var result = BasePropertyPredicateHandler <Source, Target> .GetTargetProperty(typeof(Source).GetProperty(nameof(Source.PropertyUsingConvention))); Assert.NotNull(result); }
public void ShouldReturnExpectedValueByAttribute() { var result = BasePropertyPredicateHandler <Source, Target> .GetTargetProperty(typeof(Source).GetProperty(nameof(Source.PropertyUsingAttribute))); Assert.Equal(typeof(Target).GetProperty(nameof(Target.PropertyUsingAttribute_Suffix)), result); }
public void ShouldReturnNullIfPropertyNotFoundByAttribute() { var result = BasePropertyPredicateHandler <Source, Target> .GetTargetProperty(typeof(Source).GetProperty(nameof(Source.PropertyUsingAttributeWithoutMatchingTarget))); Assert.Null(result); }
public void ShouldReturnExpectedValueByConvention() { var result = BasePropertyPredicateHandler <Source, Target> .GetTargetProperty(typeof(Source).GetProperty(nameof(Source.PropertyUsingConvention))); Assert.Equal(typeof(Target).GetProperty(nameof(Target.PropertyUsingConvention)), result); }