Пример #1
0
 public void should_return_a_datetime_greater_than_the_specified_since_datetime() =>
 ARandom.DateTimeInPastSince(DateTime.Parse("1/1/2010 2:00:00 PM"))
 .Should().BeAfter(DateTime.Parse("1/1/2010 2:00:00 PM"));
Пример #2
0
 public void should_return_a_datetime_prior_to_now() =>
 ARandom.DateTimeInPastSince(DateTime.Parse("1/1/2010 2:00:00 PM"))
 .Should().BeBefore(DateTime.Now);
Пример #3
0
 public void should_fail_if_the_specified_data_is_not_in_the_past() =>
 Catch.Exception(() => ARandom.DateTimeInPastSince(2.DaysFromNow()))
 .Should().BeOfType <ArgumentException>();