public void Should_provide_now_default_value() { var sut = new DateTimeFieldProperties { CalculatedDefaultValue = DateTimeCalculatedDefaultValue.Now }; Assert.Equal(DateTime.UtcNow.ToString("o").Substring(0, 16), sut.GetDefaultValue().ToString().Substring(0, 16)); }
public void Should_provide_specific_default_value() { var sut = new DateTimeFieldProperties { DefaultValue = FutureDays(15) }; Assert.Equal(FutureDays(15).ToString(), sut.GetDefaultValue()); }
public void Should_provide_today_default_value() { var sut = new DateTimeFieldProperties { CalculatedDefaultValue = DateTimeCalculatedDefaultValue.Today }; Assert.Equal(DateTime.UtcNow.Date.ToString("o"), sut.GetDefaultValue().ToString()); }