コード例 #1
0
 /// <summary>
 /// Returns a <see cref="ICheck{T}" /> instance that will provide check methods to be executed on a given value.
 /// </summary>
 /// <param name="value">The code to be tested.</param>
 /// <returns>
 /// A <see cref="ICheck{RunTrace}" /> instance to use in order to assert things on the given value.
 /// </returns>
 /// <remarks>
 /// Every method of the returned <see cref="ICheck{T}" /> instance will throw a <see cref="FluentCheckException" /> when failing.
 /// </remarks>
 public ICheck <RunTrace> ThatCode(Action value)
 {
     return(new FluentCheck <RunTrace>(RunTrace.GetTrace(value), this.reporter)
     {
         CustomMessage = this.message
     });
 }
コード例 #2
0
 /// <summary>
 /// Returns a <see cref="ICheck{T}" /> instance that will provide check methods to be executed on a lambda.
 /// </summary>
 /// <typeparam name="TU">Result type of the function.</typeparam>
 /// <param name="value">The code to be tested.</param>
 /// <returns>
 /// A <see cref="ICheck{RunTrace}" /> instance to use in order to assert things on the lambda.
 /// </returns>
 /// <remarks>
 /// Every method of the returned <see cref="ICheck{T}" /> instance will throw a <see cref="FluentCheckException" /> when failing.
 /// </remarks>
 public ICheck <RunTraceResult <TU> > ThatCode <TU>(Func <TU> value)
 {
     return(new FluentCheck <RunTraceResult <TU> >(RunTrace.GetTrace(value), this.reporter)
     {
         CustomMessage = this.message
     });
 }
コード例 #3
0
 /// <summary>
 /// Returns a <see cref="ICheck{T}" /> instance that will provide check methods to be executed on a lambda.
 /// </summary>
 /// <typeparam name="TU">Result type of the function.</typeparam>
 /// <param name="value">The code to be tested.</param>
 /// <returns>
 /// A <see cref="ICheck{RunTrace}" /> instance to use in order to assert things on the lambda.
 /// </returns>
 /// <remarks>
 /// Every method of the returned <see cref="ICheck{T}" /> instance will throw a <see cref="FluentCheckException" /> when failing.
 /// </remarks>
 public static ICheck <RunTraceResult <TU> > ThatCode <TU>(Func <TU> value)
 {
     return(new FluentCheck <RunTraceResult <TU> >(RunTrace.GetTrace(value), Reporter));
 }
コード例 #4
0
 /// <summary>
 /// Returns a <see cref="ICheck{T}" /> instance that will provide check methods to be executed on a given value.
 /// </summary>
 /// <param name="value">The code to be tested.</param>
 /// <returns>
 /// A <see cref="ICheck{RunTrace}" /> instance to use in order to assert things on the given value.
 /// </returns>
 /// <remarks>
 /// Every method of the returned <see cref="ICheck{T}" /> instance will throw a <see cref="FluentCheckException" /> when failing.
 /// </remarks>
 public static ICheck <RunTrace> ThatCode(Action value)
 {
     return(new FluentCheck <RunTrace>(RunTrace.GetTrace(value), Reporter));
 }