Exemplo n.º 1
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value does not occur either on, or before the specified <paramref name="date"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="date">The expected date to compare the actual value with.</param>
 /// <returns>Instance built.</returns>
 public static Constraint OnOrBefore(this Must.NotBeEntryPoint entry, DateTime date)
 {
     return(Is.Not.LessThanOrEqualTo(date));
 }
Exemplo n.º 2
0
 public static SpecificationConstraint <T> SatisfiedBy <T>(this Must.NotBeEntryPoint entry, T value)
 {
     return(new SpecificationConstraint <T>(value, false));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value does not occur within the specified time span (20 ms by default) from
 /// the specified <paramref name="date"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="date">The expected date to compare the actual value with.</param>
 /// <param name="within"></param>
 /// <returns>Instance built.</returns>
 public static Constraint CloseTo(this Must.NotBeEntryPoint entry, DateTime date, TimeSpan within)
 {
     return(Is.Not.EqualTo(date).Within(within));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value does not occur either on, or after the specified <paramref name="date"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="date">The expected date to compare the actual value with.</param>
 /// <returns>Instance built.</returns>
 public static Constraint OnOrAfter(this Must.NotBeEntryPoint entry, DateTime date)
 {
     return(Is.Not.GreaterThanOrEqualTo(date));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value does not occur within the specified number of milliseconds (20ms by default) from
 /// the specified <paramref name="date"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="date">The expected date to compare the actual value with.</param>
 /// <param name="ms"></param>
 /// <returns>Instance built.</returns>
 public static Constraint CloseTo(this Must.NotBeEntryPoint entry, DateTime date, uint ms = 20)
 {
     return(CloseTo(entry, date, TimeSpan.FromMilliseconds(ms)));
 }
Exemplo n.º 6
0
 public static PropertyConstraint Ok(this Must.NotBeEntryPoint entry, int notDefinedStatusCode)
 {
     return(new LambdaPropertyConstraint <HttpResponse>(r => r.StatusCode, Is.EqualTo((HttpStatusCode)notDefinedStatusCode)));
 }
Exemplo n.º 7
0
 public static void Extended(this Must.NotBeEntryPoint entry)
 {
 }
Exemplo n.º 8
0
 public static void Extended(this Must.NotBeEntryPoint entry, int argument)
 {
 }
Exemplo n.º 9
0
 public static PartialChangeConstraint PartialChange(this Must.NotBeEntryPoint entry,
                                                     Money remainder, uint totalCount, params QDenomination[] denominations)
 {
     return(new PartialChangeConstraint(remainder, totalCount, denominations));
 }