changed MethodInvoking Soure and Targt to take a string via a a property methodName (fix for INT-272)

This commit is contained in:
Jonas Partner
2008-07-02 19:29:25 +00:00
parent ab858ee247
commit 7cefe22b96
6 changed files with 8 additions and 9 deletions

View File

@@ -16,7 +16,7 @@
<property name="object">
<bean class="org.springframework.integration.handler.TestSource"/>
</property>
<property name="method" value="foo"/>
<property name="methodName" value="foo"/>
</bean>
</constructor-arg>
<constructor-arg ref="channel"/>

View File

@@ -34,7 +34,7 @@ public class MethodInvokingSourceTests {
public void testValidMethod() {
MethodInvokingSource source = new MethodInvokingSource();
source.setObject(new TestBean());
source.setMethod("validMethod");
source.setMethodName("validMethod");
Message<?> result = source.receive();
assertNotNull(result);
assertNotNull(result.getPayload());
@@ -45,7 +45,7 @@ public class MethodInvokingSourceTests {
public void testNoMatchingMethodName() {
MethodInvokingSource source = new MethodInvokingSource();
source.setObject(new TestBean());
source.setMethod("noMatchingMethod");
source.setMethodName("noMatchingMethod");
source.receive();
}
@@ -53,7 +53,7 @@ public class MethodInvokingSourceTests {
public void testInvalidMethodWithArg() {
MethodInvokingSource source = new MethodInvokingSource();
source.setObject(new TestBean());
source.setMethod("invalidMethodWithArg");
source.setMethodName("invalidMethodWithArg");
source.receive();
}
@@ -61,7 +61,7 @@ public class MethodInvokingSourceTests {
public void testInvalidMethodWithNoReturnValue() {
MethodInvokingSource source = new MethodInvokingSource();
source.setObject(new TestBean());
source.setMethod("invalidMethodWithNoReturnValue");
source.setMethodName("invalidMethodWithNoReturnValue");
source.receive();
}