Esempio n. 1
0
 public void ConstructorIsInvoked()
 {
     RuntimeMember method = new RuntimeType(instance.GetType()).GetConstructor(0);
     Assert.IsNotNull(method);
     TypedValue result = method.Invoke(new object[] {});
     Assert.AreEqual(typeof(SampleClass), result.Type);
 }
Esempio n. 2
0
 public void StaticMethodWithParmsIsInvoked()
 {
     RuntimeMember method = new RuntimeType(instance.GetType()).FindStatic("parse", new [] {typeof(string)});
     Assert.IsNotNull(method);
     TypedValue result = method.Invoke(new object[] {"input"});
     Assert.AreEqual(typeof(SampleClass), result.Type);
 }