Example #1
0
 public static IMatcher<TimeSpan?> LessThanOrEqualTo(TimeSpan expect)
 {
     return Matchers.Function((TimeSpan? actual) => actual.IsValidTimeSpan() && expect.SafeCompareTo(actual) >= 0, "a TimeSpan <= " + expect.ToPrettyString());
 }
Example #2
0
 public static IMatcher<TimeSpan?> BetweenIncluding(TimeSpan expectFrom, TimeSpan expectTo)
 {
     return Matchers.Function((TimeSpan? actual) => actual.IsValidTimeSpan() && expectFrom.SafeCompareTo(actual) <= 0 && expectTo.SafeCompareTo(actual) >= 0, "a TimeSpan where " + expectFrom.ToPrettyString() + " <= value <= " + expectTo.ToPrettyString());
 }
Example #3
0
 public static IMatcher<TimeSpan?> GreaterThan(TimeSpan expect)
 {
     return Matchers.Function((TimeSpan? actual) => actual.IsValidTimeSpan() && expect.SafeCompareTo(actual) < 0, "a TimeSpan > " + expect.ToPrettyString());
 }