コード例 #1
0
 private void AddStepConstraints(IMethodOptions <RhinoMocksExtensions.VoidType> methodOptions, ScenarioStep step, Dictionary <string, string> paramSubst)
 {
     methodOptions
     .IgnoreArguments()
     .Constraints(
         Is.Equal(GetReplacedText(step.Text, paramSubst)),
         Is.Equal(GetReplacedText(step.MultiLineTextArgument, paramSubst)),
         step.TableArg == null ? Is.Equal(null) : Is.NotNull());
 }
コード例 #2
0
 /// <summary>
 /// Allows a method to be stubbed with a supplied action.
 /// </summary>
 /// <remarks>This method is the same as Do but does not require IgnoreArguments() to be specified.</remarks>
 public static IMethodOptions <object> AlwaysDo <T1, T2, T3>(this IMethodOptions <object> options, Action <T1, T2, T3> action)
 {
     return(options.IgnoreArguments().Do(action));
 }
コード例 #3
0
 /// <summary>
 /// Allows a method to be stubbed with a supplied action.
 /// </summary>
 /// <remarks>This method is the same as Do but does not require IgnoreArguments() to be specified.</remarks>
 public static IMethodOptions <TResult> AlwaysDo <T1, T2, T3, T4, T5, TResult>(this IMethodOptions <TResult> options, Func <T1, T2, T3, T4, T5, TResult> action)
 {
     return(options.IgnoreArguments().Do(action));
 }