public void TestClassInstance () { var callee = new TestSubject (); var wrapper = new Wrapper(callee, "MethodConcatenate"); EnvDict env = new Dictionary<string, object>(); var t = wrapper.InvokeRoute(env, this.dict); Assert.AreEqual(this.expected, (string)env["result"]); }
public void TestTypeConversion () { var c = new TestSubject (); AddFunc f = c.MethodAdd; EnvDict env = new Dictionary<string, object>(); var wrapper = new Wrapper (f); wrapper.InvokeRoute(env, this.dict).Wait(); Assert.AreEqual(5, (int)env["result"]); }
public void TestDelegateToInstanceMethod () { var c = new TestSubject (); ConcatFunc f = c.MethodConcatenate; EnvDict env = new Dictionary<string, object>(); var wrapper = new Wrapper (f); wrapper.InvokeRoute(env, this.dict).Wait(); Assert.AreEqual(this.expected, (string)env["result"]); }