Search in sources :

Example 26 with TestChannelResolver

use of org.springframework.integration.channel.TestChannelResolver in project spring-integration by spring-projects.

the class MethodInvokingRouterTests method multiChannelNameResolutionByPayloadConfiguredByMethodName.

@Test
public void multiChannelNameResolutionByPayloadConfiguredByMethodName() {
    TestChannelResolver channelResolver = new TestChannelResolver();
    MultiChannelNameRoutingTestBean testBean = new MultiChannelNameRoutingTestBean();
    MethodInvokingRouter router = new MethodInvokingRouter(testBean, "routePayload");
    this.doTestMultiChannelNameResolutionByPayload(router, channelResolver);
}
Also used : TestChannelResolver(org.springframework.integration.channel.TestChannelResolver) Test(org.junit.Test)

Example 27 with TestChannelResolver

use of org.springframework.integration.channel.TestChannelResolver in project spring-integration by spring-projects.

the class MethodInvokingRouterTests method multiChannelNameArrayResolutionByMessageConfiguredByMethodName.

@Test
public void multiChannelNameArrayResolutionByMessageConfiguredByMethodName() {
    TestChannelResolver channelResolver = new TestChannelResolver();
    MultiChannelNameRoutingTestBean testBean = new MultiChannelNameRoutingTestBean();
    MethodInvokingRouter router = new MethodInvokingRouter(testBean, "routeMessageToArray");
    this.doTestMultiChannelNameArrayResolutionByMessage(router, channelResolver);
}
Also used : TestChannelResolver(org.springframework.integration.channel.TestChannelResolver) Test(org.junit.Test)

Example 28 with TestChannelResolver

use of org.springframework.integration.channel.TestChannelResolver in project spring-integration by spring-projects.

the class MethodInvokingRouterTests method multiChannelListResolutionByPayloadConfiguredByMethodName.

@Test
public void multiChannelListResolutionByPayloadConfiguredByMethodName() {
    TestChannelResolver channelResolver = new TestChannelResolver();
    MultiChannelInstanceRoutingTestBean testBean = new MultiChannelInstanceRoutingTestBean(channelResolver);
    MethodInvokingRouter router = new MethodInvokingRouter(testBean, "routePayload");
    this.doTestMultiChannelListResolutionByPayload(router, channelResolver);
}
Also used : TestChannelResolver(org.springframework.integration.channel.TestChannelResolver) Test(org.junit.Test)

Aggregations

TestChannelResolver (org.springframework.integration.channel.TestChannelResolver)28 Test (org.junit.Test)27 Method (java.lang.reflect.Method)10 GenericMessage (org.springframework.messaging.support.GenericMessage)10 QueueChannel (org.springframework.integration.channel.QueueChannel)8 Message (org.springframework.messaging.Message)6 ServiceActivatingHandler (org.springframework.integration.handler.ServiceActivatingHandler)2 TestUtils (org.springframework.integration.test.util.TestUtils)2 ArrayList (java.util.ArrayList)1 MessageDeliveryException (org.springframework.messaging.MessageDeliveryException)1