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); }
string stringReturn() { return((string)mock.Invoke("stringReturn", new object[0], new string[0])); }