INT-944: Reproduction (now with class and method= on the service-activator)

This commit is contained in:
Iwein Fuld
2009-12-24 13:45:38 +00:00
parent 4c210ad05f
commit ab7272d980
2 changed files with 9 additions and 5 deletions

View File

@@ -14,13 +14,15 @@
<i:channel id="in"/>
<i:service-activator input-channel="in" output-channel="out">
<i:service-activator input-channel="in" output-channel="out" method="move">
<bean class="org.mockito.Mockito" factory-method="mock">
<constructor-arg
value="org.springframework.integration.test.mockito.ServiceActivatorOnMockitoMockTests$SingleMethod"/>
</bean>
</i:service-activator>
<i:channel id="out"/>
<i:channel id="out">
<i:queue capacity="10"/>
</i:channel>
</beans>

View File

@@ -5,6 +5,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.integration.channel.PollableChannel;
import org.springframework.integration.core.MessageChannel;
import org.springframework.integration.message.MessageBuilder;
@@ -16,7 +17,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*/
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@Ignore //remove to reproduce INT-944
@Ignore//remove to reproduce INT-944
public class ServiceActivatorOnMockitoMockTests {
@Autowired @Qualifier("in")
@@ -25,8 +26,9 @@ public class ServiceActivatorOnMockitoMockTests {
@Autowired @Qualifier("out")
PollableChannel out;
public static interface SingleMethod {
String move(String s);
public static class SingleMethod {
@ServiceActivator
public String move(String s){return s;};
}
@Test