Search in sources :

Example 1 with AsyncAmqpOutboundGateway

use of org.springframework.integration.amqp.outbound.AsyncAmqpOutboundGateway in project spring-integration by spring-projects.

the class AmqpOutboundGatewayParserTests method testGatewayConfig.

@Test
public void testGatewayConfig() {
    Object edc = this.context.getBean("rabbitGateway");
    assertFalse(TestUtils.getPropertyValue(edc, "autoStartup", Boolean.class));
    AmqpOutboundEndpoint gateway = TestUtils.getPropertyValue(edc, "handler", AmqpOutboundEndpoint.class);
    assertEquals("amqp:outbound-gateway", gateway.getComponentType());
    assertTrue(TestUtils.getPropertyValue(gateway, "requiresReply", Boolean.class));
    checkGWProps(this.context, gateway);
    AsyncAmqpOutboundGateway async = this.context.getBean("asyncGateway.handler", AsyncAmqpOutboundGateway.class);
    assertEquals("amqp:outbound-async-gateway", async.getComponentType());
    checkGWProps(this.context, async);
    assertSame(this.context.getBean("asyncTemplate"), TestUtils.getPropertyValue(async, "template"));
    assertSame(this.context.getBean("ems"), TestUtils.getPropertyValue(gateway, "errorMessageStrategy"));
}
Also used : AmqpOutboundEndpoint(org.springframework.integration.amqp.outbound.AmqpOutboundEndpoint) AsyncAmqpOutboundGateway(org.springframework.integration.amqp.outbound.AsyncAmqpOutboundGateway) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Test(org.junit.Test)

Aggregations

AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 Test (org.junit.Test)1 AmqpOutboundEndpoint (org.springframework.integration.amqp.outbound.AmqpOutboundEndpoint)1 AsyncAmqpOutboundGateway (org.springframework.integration.amqp.outbound.AsyncAmqpOutboundGateway)1