/// <summary> /// Adds a behavior to a mock. /// </summary> public static IMock AddBehavior(this IMock mock, InvokeBehavior behavior, string name = null) { mock.BehaviorFor(MockSetup.Current).Behaviors.Add(new InvocationBehavior(behavior, name)); return(mock); }
/// <summary> /// Inserts a behavior into the mock behavior pipeline at the specified /// index. /// </summary> public static IMock InsertBehavior(this IMock mock, int index, InvokeBehavior behavior, string name = null) { mock.BehaviorFor(MockSetup.Current).Behaviors.Insert(index, new InvocationBehavior(behavior, name)); return(mock); }
public IMockBehavior BehaviorFor(IMockSetup setup) => mock.BehaviorFor(setup);