コード例 #1
0
 /// <summary>
 /// Builds an instance of <see cref="ComposablePropertyConstraint"/> to check <paramref name="constraint"/> over the value of the property expressed by <paramref name="property"/>
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="property">Expression that represents the name of the property.</param>
 /// <param name="constraint">The constraint to apply to the property.</param>
 /// <returns>Instance built.</returns>
 public static ComposablePropertyConstraint Property <T>(this Must.HaveEntryPoint entry, Expression <Func <T, object> > property, Constraint constraint)
 {
     return(ComposablePropertyConstraint.New(property, constraint));
 }
コード例 #2
0
 /// <summary>
 /// Builds an instance of <see cref="EnumerableCountConstraint"/> that allows asserting on the number of elements of any instance of <see cref="System.Collections.IEnumerable"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="countConstraint">The constraint to be applied to the element count.</param>
 /// <returns>Instance built.</returns>
 public static Constraint Count(this Must.HaveEntryPoint entry, Constraint countConstraint)
 {
     return(new EnumerableCountConstraint(countConstraint));
 }
コード例 #3
0
 /// <summary>
 /// Builds an instance of <see cref="ComposablePropertyConstraint"/> to check <paramref name="constraint"/> over the value of the property expressed by <paramref name="name"/>
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="name">The name of the property.</param>
 /// <param name="constraint">The constraint to apply to the property.</param>
 /// <returns>Instance built.</returns>
 public static ComposablePropertyConstraint Property(this Must.HaveEntryPoint entry, string name, Constraint constraint)
 {
     return(new ComposablePropertyConstraint(name, constraint));
 }
コード例 #4
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value has the provided <paramref name="second"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="second">Expected property of the current date.</param>
 /// <returns>Instance built.</returns>
 public static Constraint Second(this Must.HaveEntryPoint entry, uint second)
 {
     return(Has.Property("Second").EqualTo(second));
 }
コード例 #5
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value has the provided <paramref name="millisecond"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="millisecond">Expected property of the current date.</param>
 /// <returns>Instance built.</returns>
 public static Constraint Millisecond(this Must.HaveEntryPoint entry, uint millisecond)
 {
     return(Has.Property("Millisecond").EqualTo(millisecond));
 }
コード例 #6
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value has the provided <paramref name="hour"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="hour">Expected property of the current date.</param>
 /// <returns>Instance built.</returns>
 public static Constraint Hour(this Must.HaveEntryPoint entry, uint hour)
 {
     return(Has.Property("Hour").EqualTo(hour));
 }
コード例 #7
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value has the provided <paramref name="minute"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="minute">Expected property of the current date.</param>
 /// <returns>Instance built.</returns>
 public static Constraint Minute(this Must.HaveEntryPoint entry, uint minute)
 {
     return(Has.Property("Minute").EqualTo(minute));
 }
コード例 #8
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value has the provided <paramref name="month"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="month">Expected property of the current date.</param>
 /// <returns>Instance built.</returns>
 public static Constraint Month(this Must.HaveEntryPoint entry, uint month)
 {
     return(Has.Property("Month").EqualTo(month));
 }
コード例 #9
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value has the provided <paramref name="day"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="day">Expected property of the current date.</param>
 /// <returns>Instance built.</returns>
 public static Constraint Day(this Must.HaveEntryPoint entry, uint day)
 {
     return(Has.Property("Day").EqualTo(day));
 }
コード例 #10
0
 public static HeaderConstraint ResetHeader(this Must.HaveEntryPoint entry, Constraint constraint)
 {
     return(new HeaderConstraint("X-Rate-Limit-Reset", constraint));
 }
コード例 #11
0
 /// <summary>
 /// Builds an instance of <see cref="Constraint"/> that tests whether the actual
 /// value has the provided <paramref name="year"/>.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="year">Expected property of the current date.</param>
 /// <returns>Instance built.</returns>
 public static Constraint Year(this Must.HaveEntryPoint entry, int year)
 {
     return(Has.Property("Year").EqualTo(year));
 }
コード例 #12
0
 public static HeaderConstraint RetryHeader(this Must.HaveEntryPoint entry, Constraint constraint)
 {
     return(new HeaderConstraint("Retry-After", constraint));
 }
コード例 #13
0
 public static HeaderConstraint Header(this Must.HaveEntryPoint entry, string header, Constraint constraint)
 {
     return(new HeaderConstraint(header, constraint));
 }
コード例 #14
0
 public static Constraint Model <T>(this Must.HaveEntryPoint entry, T model)
 {
     return(Must.Have.Property <TreeNode <T> >(n => n.Model, Is.SameAs(model)));
 }
コード例 #15
0
 public static void Extended(this Must.HaveEntryPoint entry, int argument)
 {
 }
コード例 #16
0
 public static void Extended(this Must.HaveEntryPoint entry)
 {
 }