public void InvokeAllNamedArgumentsWithConversion () { ArgumentConvertingMethodInvoker vkr = new ArgumentConvertingMethodInvoker (); Voker instance = new Voker (); vkr.TargetObject = instance; vkr.TargetMethod = "HiEverybody"; // CSV string should be converted to string [] vkr.AddNamedArgument("nameS", new object [] {"Rick, Mark, Griffin, Federico, Choy, Aleks"}); vkr.Prepare (); string actual = vkr.Invoke () as string; Assert.IsNotNull (actual); Assert.AreEqual ("Hi ya'll", actual); Assert.IsNotNull (instance.developers); }
public void InvokeAllNamedArgumentsWithConversion() { ArgumentConvertingMethodInvoker vkr = new ArgumentConvertingMethodInvoker(); Voker instance = new Voker(); vkr.TargetObject = instance; vkr.TargetMethod = "HiEverybody"; // CSV string should be converted to string [] vkr.AddNamedArgument("nameS", new object [] { "Rick, Mark, Griffin, Federico, Choy, Aleks" }); vkr.Prepare(); string actual = vkr.Invoke() as string; Assert.IsNotNull(actual); Assert.AreEqual("Hi ya'll", actual); Assert.IsNotNull(instance.developers); }
public static string HiVoker(Voker buddy) { return("Hi " + buddy.name); }
public static string HiVoker (Voker buddy) { return "Hi " + buddy.name; }