public void when_timespan_is_greater_then_range_maximum_validation_fails() { //given var sut = new TimeSpanRangedWithStrings { TimeSpan = TimeSpan.FromHours(13) }; //then Validate(sut).Should().Throw <ValidationException>(); }
public void when_timespan_is_within_the_range_validation_passes() { //given var sut = new TimeSpanRangedWithStrings { TimeSpan = TimeSpan.FromHours(11) }; //then Validate(sut).Should().NotThrow <ValidationException>(); }
public void when_timespan_is_less_then_range_minimum_validation_fails() { //given var sut = new TimeSpanRangedWithStrings { TimeSpan = TimeSpan.Zero }; //then Validate(sut).Should().Throw <ValidationException>(); }