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); }
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); }