/// <summary> /// Checks that the actual duration is equal to a target duration. /// </summary> /// <param name="check">The fluent check to be extended.</param> /// <param name="comparand">The duration to be compared to.</param> /// <returns>A check link.</returns> /// /// <exception cref="FluentCheckException">The actual value is not equal to the target duration.</exception> public static ICheckLink <ICheck <TimeSpan> > IsEqualTo(this ICheck <TimeSpan> check, TimeSpan comparand) { var unit = TimeHelper.DiscoverUnit(comparand); return(check.IsEqualTo(new Duration(comparand, unit))); }
public static void Is <T>(this ICheck <T> check, T value) { check.IsEqualTo(value); }