static void Main(string[] args) { var t = new TestClass(); var typ = t.GetType(); var display = typ.GetMethod("Display"); var replace = typ.GetMethod("Replace"); MockUtils.SetMock(t, display.MethodHandle.Value, replace.MethodHandle.Value); }