public void ReturnsParameterValueFromMostRecentOfMultipleCalls() { var action = new CollectAction(1); action.Invoke(new Invocation(receiver, methodInfo, new object[] {123, "hello"})); action.Invoke(new Invocation(receiver, methodInfo, new object[] {456, "goodbye"})); Assert.AreEqual("goodbye", action.Parameter); }
public void CollectsParameterValueAtSpecifiedIndex() { var action = new CollectAction(1); action.Invoke(new Invocation(receiver, methodInfo, new object[] {123, "hello"})); Assert.AreEqual("hello", action.Parameter); }