public DelegateFakeObjectCall(Delegate instance, MethodInfo method, object[] arguments)
 {
     this.instance       = instance;
     this.Arguments      = new ArgumentCollection(arguments, method);
     this.Method         = method;
     this.SequenceNumber = SequenceNumberManager.Next();
 }
Example #2
0
        public CastleInvocationCallAdapter(IInvocation invocation)
        {
            this.invocation = invocation;
            this.Method     = invocation.Method;

            this.Arguments = new ArgumentCollection(invocation.Arguments, this.Method);

            this.SequenceNumber = SequenceNumberManager.Next();
        }
Example #3
0
        public static FakeCall Create <T>(string methodName, Type[] parameterTypes, object[] arguments) where T : class
        {
            var method = typeof(T).GetMethod(methodName, parameterTypes);

            return(new FakeCall
            {
                Method = method,
                Arguments = new ArgumentCollection(arguments, method),
                FakedObject = A.Fake <T>(),
                SequenceNumber = SequenceNumberManager.Next()
            });
        }