public void TestNoMatchingMethodName()
 {
     MethodInvokingMessageSource source = new MethodInvokingMessageSource();
     source.Object = new TestObject();
     source.MethodName = "NoMatchingMethod";
     source.Receive();
 }
 public void TestInvalidMethodWithNoReturnValue()
 {
     MethodInvokingMessageSource source = new MethodInvokingMessageSource();
     source.Object = new TestObject();
     source.MethodName = "InvalidMethodWithNoReturnValue";
     source.Receive();
 }
 public void TestValidMethod()
 {
     MethodInvokingMessageSource source = new MethodInvokingMessageSource();
     source.Object = new TestObject();
     source.MethodName = "ValidMethod";
     IMessage result = source.Receive();
     Assert.IsNotNull(result);
     Assert.IsNotNull(result.Payload);
     Assert.That(result.Payload, Is.EqualTo("valid"));
 }