public DelegateFakeObjectCall(Delegate instance, MethodInfo method, object[] arguments) { this.instance = instance; this.Arguments = new ArgumentCollection(arguments, method); this.Method = method; SequenceNumberManager.RecordSequenceNumber(this); }
public CastleInvocationCallAdapter(IInvocation invocation) { this.invocation = invocation; this.Method = invocation.Method; this.Arguments = new ArgumentCollection(invocation.Arguments, this.Method); SequenceNumberManager.RecordSequenceNumber(this); }
private void StubCalls(int numberOfCalls) { for (int i = 0; i < numberOfCalls; i++) { var call = A.Fake <ICompletedFakeObjectCall>(); SequenceNumberManager.RecordSequenceNumber(call); this.calls.Add(call); } }
public static FakeCall Create <T>(string methodName, Type[] parameterTypes, object[] arguments) where T : class { var method = typeof(T).GetMethod(methodName, parameterTypes); var call = new FakeCall { Method = method, Arguments = new ArgumentCollection(arguments, method), FakedObject = A.Fake <T>(), }; SequenceNumberManager.RecordSequenceNumber(call); return(call); }