Example #1
0
        public override int Add(int x, int y)
        {
            var invocation = new TestInvocation(() => base.Add(x, y))
            {
                Mock      = mock,
                Target    = this,
                Method    = typeof(ICalculator).GetMethod("Add"),
                Arguments = new object[] { x, y }
            };

            mock.Invoke(invocation);

            return((int)invocation.ReturnValue);
        }
Example #2
0
 string stringReturn()
 {
     return((string)mock.Invoke("stringReturn", new object[0], new string[0]));
 }