public void MethodCatcherTest2() { var catcher = new TypeMethodCatcher((System.Linq.Expressions.Expression <Action <ITest> >)(ins => ins.Method2())); Assert.AreEqual("Method2", catcher.Method.Name); }
public void MethodCatcherTest3() { var catcher = new TypeMethodCatcher((System.Linq.Expressions.Expression <Action <ITest, int, int> >)((ins, _1, _2) => ins.Method3(_1, _2))); Assert.AreEqual("Method3", catcher.Method.Name); }
public void GetMethod() { TypeMethodCatcher catcher = new TypeMethodCatcher((System.Linq.Expressions.Expression <Action <Test> >)(ins => ins.Method1())); NUnit.Framework.Assert.AreEqual("Method1", catcher.Method.Name); }