/// <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 ICodeCheck <RunTraceResult <TU> > ThatCode <TU>(Func <TU> value) { return(new FluentCodeCheck <RunTraceResult <TU> >(FluentCodeCheck <RunTraceResult <TU> > .GetTrace(value))); }
/// <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 ICodeCheck <RunTrace> ThatCode(Action value) { return(new FluentCodeCheck <RunTrace>(FluentCodeCheck <RunTraceResult <Action> > .GetTrace(value))); }