[InlineData(1754, 1, 1, true)] // > 1753 public void IsSatisfiedBy(int year, int month, int day, bool expected) { var date = new DateTime(year, month, day); var specification = new SqlDateSpecification(); bool actual = specification.IsSatisfiedBy(date); Assert.Equal(expected, actual); }
protected override bool IsValid(PropertyValidatorContext context) { var date = this.GetDateTime(context.PropertyValue); if (!date.HasValue) { return(true); } var specification = new SqlDateSpecification(); return(specification.IsSatisfiedBy(date.Value)); }