public void TestTwoArgumentMethodWithOnlyOneArgumentProvided()
 {
     TestBean testBean = new TestBean();
     NameResolvingMethodInvoker invoker = new NameResolvingMethodInvoker(testBean,
                                                                         "StringAndIntegerArgumentMethod");
     invoker.InvokeMethod("ABC");
 }
 public void TestIntegerArgumentWithVoidReturnAndFailedConversion()
 {
     TestBean testBean = new TestBean();
     NameResolvingMethodInvoker invoker = new NameResolvingMethodInvoker(testBean,
                                                                         "IntegerArgumentWithVoidReturn");
     invoker.InvokeMethod("ABC");
 }
 public void TestStringArgumentWithVoidReturnAndSuccessfulConversion()
 {
     TestBean testBean = new TestBean();
     NameResolvingMethodInvoker invoker = new NameResolvingMethodInvoker(testBean, "StringArgumentWithVoidReturn");
     invoker.InvokeMethod(123);
     Assert.That(testBean.lastStringArgument, Is.EqualTo("123"));
 }
 public void TestTwoArgumentMethodWithOnlyOneArgumentProvided()
 {
     TestBean testBean = new TestBean();
     MethodInfo method = testBean.GetType().GetMethod("StringAndIntegerArgumentMethod");
     DefaultMethodInvoker invoker = new DefaultMethodInvoker(testBean, method);
     invoker.InvokeMethod("ABC");
 }
 public void TestIntegerArgumentWithVoidReturnAndFailedConversion()
 {
     TestBean testBean = new TestBean();
     MethodInfo method = testBean.GetType().GetMethod("IntegerArgumentWithVoidReturn");
     DefaultMethodInvoker invoker = new DefaultMethodInvoker(testBean, method);
     invoker.InvokeMethod("ABC");
 }
 public void TestStringArgumentWithVoidReturnAndSuccessfulConversion()
 {
     TestBean testBean = new TestBean();
     MethodInfo method = testBean.GetType().GetMethod("StringArgumentWithVoidReturn");
     DefaultMethodInvoker invoker = new DefaultMethodInvoker(testBean, method);
     invoker.InvokeMethod(123);
     Assert.That(testBean.lastStringArgument, Is.EqualTo("123"));
 }
 public void TestTwoArgumentsAndNoConversionRequired()
 {
     TestBean testBean = new TestBean();
     NameResolvingMethodInvoker invoker = new NameResolvingMethodInvoker(testBean,
                                                                         "StringAndIntegerArgumentMethod");
     object result = invoker.InvokeMethod("ABC", 456);
     Assert.That(result, Is.EqualTo("ABC:456"));
 }
 public void TestTwoArgumentsAndSuccessfulConversion()
 {
     TestBean testBean = new TestBean();
     NameResolvingMethodInvoker invoker = new NameResolvingMethodInvoker(testBean,
                                                                         "StringAndIntegerArgumentMethod");
     object result = invoker.InvokeMethod("ABC", "789");
     Assert.That(result, Is.EqualTo("ABC:789"));
 }
 public void TestTwoArgumentsAndNoConversionRequired()
 {
     TestBean testBean = new TestBean();
     MethodInfo method = testBean.GetType().GetMethod("StringAndIntegerArgumentMethod");
     DefaultMethodInvoker invoker = new DefaultMethodInvoker(testBean, method);
     object result = invoker.InvokeMethod("ABC", 456);
     Assert.That(result, Is.EqualTo("ABC:456"));
 }