public void BasicMethodDiffersInCase() { var input = new MethodTests(); var result = Invoke(input, "stringRESULT"); Assert.AreEqual("hello world", result); }
public void FieldInvokedForMethodWithNoArguments() { var target = new MethodTests(); var result = Invoke(target, "Field"); Assert.AreEqual("Marshal", result); }
public void MethodNameExactMatch() { var input = new MethodTests(); var result = Invoke(input, "StringResult"); Assert.AreEqual("hello world", result); }
public void ParamArrayWithTwoNullArguments() { var target = new MethodTests(); var result = Invoke(target, "ParamArray", null, null); Assert.AreEqual(2, result); }
public void PropertyInvokedForMethodWithNoArguments() { var target = new MethodTests(); var result = Invoke(target, "Property"); Assert.AreEqual("A property", result); }
public void ParamArrayWithArrayWithOneNullArgument() { var target = new MethodTests(); var result = Invoke(target, "ParamArray", new object[] { new object[1] }); Assert.AreEqual(1, result); }
public void ParamArrayWithNullArgument() { var target = new MethodTests(); var result = Invoke(target, "ParamArray", new object[] { null }); Assert.IsNull(result); }
public void ParamArrayWithTwoArguments() { var target = new MethodTests(); var result = Invoke(target, "ParamArray", "one", "two"); Assert.AreEqual(2, result); }
public void ParamArrayWithNoArguments() { var target = new MethodTests(); var result = Invoke(target, "ParamArray"); Assert.AreEqual(0, result); }
public void MethodOneParamaterAssignableTypeMatch() { var target = new MethodTests(); var param1 = "hello world"; var result = Invoke(target, "OneParameter", param1); Assert.AreEqual("One Param Success", result); }
public void MethodOneParamaterExactTypeMatch() { var target = new MethodTests(); var param1 = new object(); var result = Invoke(target, "OneParameter", param1); Assert.AreEqual("One Param Success", result); }
public void ParamArrayWithArrayArguments() { var target = new MethodTests(); var arg1 = new string[] { "one", "two" }; var result = Invoke(target, "ParamArray", new[] { arg1 }); Assert.AreEqual(2, result); }
public void calling_static() { StaticMethod("hej"); //this.StaticMethod("hej"); // Error, this är instancen av en klass. Static ligger på "typen". MethodTests.StaticMethod("hello"); }