public void InvokeMethodWithNonNullParametersViaReflection_IsResult() { var instance = new TestReflectionClass1(); var result = instance.InvokeMethodWithNonNullParametersViaReflection("PublicMethodWithIntParameter", 99); Assert.AreEqual(99, result); }
public void InvokeMethodWithNonNullParametersViaReflection_PassesParameters() { var instance = new TestReflectionClass1(); instance.InvokeMethodWithNonNullParametersViaReflection("PublicMethodWithIntParameter", 88); Assert.AreEqual(88, instance.PublicMethodWithIntParameterData); }
public void InvokeMethodWithNonNullParametersViaReflection_PropagatesNullReferenceExceptionNullParameter() { var instance = new TestReflectionClass1(); ExceptionAssert.Propagates <NullReferenceException>(() => instance.InvokeMethodWithNonNullParametersViaReflection("PublicMethodWithIntParameter", new object[] { null })); }
public void InvokeMethodWithNonNullParametersViaReflection_CallsMethod() { var instance = new TestReflectionClass1(); instance.InvokeMethodWithNonNullParametersViaReflection("PublicParameterlessMethod"); Assert.IsTrue(instance.PublicParameterlessMethodCalled); }