public void Should_Match_Property_With_Multiple_ValidatorAttributes() { var target = new DataAnnotationsValidationPlugin(); var data = new Data(); Assert.True(target.Match(new WeakReference(data), nameof(Data.PhoneNumber))); }
public void Should_Not_Match_Property_Without_ValidatorAttribute() { var target = new DataAnnotationsValidationPlugin(); var data = new Data(); Assert.False(target.Match(new WeakReference(data), nameof(Data.Unvalidated))); }
public void Should_Match_Property_With_ValidatorAttribute() { var target = new DataAnnotationsValidationPlugin(); var data = new Data(); Assert.True(target.Match(new WeakReference(data), nameof(Data.Between5And10))); }