Пример #1
0
		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"]);
		}
Пример #2
0
 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"]);
 }
Пример #3
0
		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"]);
		}