From 618282db91fe8ac5750680e492338284126085c1 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Thu, 13 Nov 2008 01:16:58 +0000 Subject: [PATCH] Removed extra request channel settings in test class. --- .../jms/config/spring-integration-jms-1.0.xsd | 1 + .../config/JmsInboundGatewayParserTests.java | 18 +++++++++--------- .../jmsGatewayTransactionManagerTests.xml | 4 +++- ...ewayWithConnectionFactoryAndDestination.xml | 4 +++- ...WithConnectionFactoryAndDestinationName.xml | 4 +++- .../jmsGatewayWithConnectionFactoryOnly.xml | 4 +++- .../jmsGatewayWithDefaultConnectionFactory.xml | 4 +++- .../jmsGatewayWithEmptyConnectionFactory.xml | 4 +++- .../config/jmsGatewayWithMessageConverter.xml | 4 +++- 9 files changed, 31 insertions(+), 16 deletions(-) diff --git a/org.springframework.integration.jms/src/main/java/org/springframework/integration/jms/config/spring-integration-jms-1.0.xsd b/org.springframework.integration.jms/src/main/java/org/springframework/integration/jms/config/spring-integration-jms-1.0.xsd index 192d9f1f90..8ac91bd4ca 100644 --- a/org.springframework.integration.jms/src/main/java/org/springframework/integration/jms/config/spring-integration-jms-1.0.xsd +++ b/org.springframework.integration.jms/src/main/java/org/springframework/integration/jms/config/spring-integration-jms-1.0.xsd @@ -57,6 +57,7 @@ + diff --git a/org.springframework.integration.jms/src/test/java/org/springframework/integration/jms/config/JmsInboundGatewayParserTests.java b/org.springframework.integration.jms/src/test/java/org/springframework/integration/jms/config/JmsInboundGatewayParserTests.java index cc5d93d554..11ae0acd65 100644 --- a/org.springframework.integration.jms/src/test/java/org/springframework/integration/jms/config/JmsInboundGatewayParserTests.java +++ b/org.springframework.integration.jms/src/test/java/org/springframework/integration/jms/config/JmsInboundGatewayParserTests.java @@ -26,7 +26,7 @@ import org.springframework.beans.DirectFieldAccessor; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.channel.QueueChannel; +import org.springframework.integration.channel.PollableChannel; import org.springframework.integration.core.Message; import org.springframework.integration.jms.JmsInboundGateway; import org.springframework.jms.connection.JmsTransactionManager; @@ -41,9 +41,9 @@ public class JmsInboundGatewayParserTests { public void testGatewayWithConnectionFactoryAndDestination() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "jmsGatewayWithConnectionFactoryAndDestination.xml", this.getClass()); - QueueChannel channel = new QueueChannel(1); + PollableChannel channel = (PollableChannel) context.getBean("requestChannel"); JmsInboundGateway gateway = (JmsInboundGateway) context.getBean("jmsGateway"); - gateway.setRequestChannel(channel); + assertEquals(JmsInboundGateway.class, gateway.getClass()); context.start(); Message message = channel.receive(3000); assertNotNull("message should not be null", message); @@ -55,9 +55,9 @@ public class JmsInboundGatewayParserTests { public void testGatewayWithConnectionFactoryAndDestinationName() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "jmsGatewayWithConnectionFactoryAndDestinationName.xml", this.getClass()); - QueueChannel channel = new QueueChannel(1); + PollableChannel channel = (PollableChannel) context.getBean("requestChannel"); JmsInboundGateway gateway = (JmsInboundGateway) context.getBean("jmsGateway"); - gateway.setRequestChannel(channel); + assertEquals(JmsInboundGateway.class, gateway.getClass()); context.start(); Message message = channel.receive(3000); assertNotNull("message should not be null", message); @@ -69,9 +69,9 @@ public class JmsInboundGatewayParserTests { public void testGatewayWithMessageConverter() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "jmsGatewayWithMessageConverter.xml", this.getClass()); - QueueChannel channel = new QueueChannel(1); + PollableChannel channel = (PollableChannel) context.getBean("requestChannel"); JmsInboundGateway gateway = (JmsInboundGateway) context.getBean("jmsGateway"); - gateway.setRequestChannel(channel); + assertEquals(JmsInboundGateway.class, gateway.getClass()); context.start(); Message message = channel.receive(3000); assertNotNull("message should not be null", message); @@ -132,9 +132,9 @@ public class JmsInboundGatewayParserTests { public void testGatewayWithDefaultConnectionFactory() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "jmsGatewayWithDefaultConnectionFactory.xml", this.getClass()); - QueueChannel channel = new QueueChannel(1); + PollableChannel channel = (PollableChannel) context.getBean("requestChannel"); JmsInboundGateway gateway = (JmsInboundGateway) context.getBean("jmsGateway"); - gateway.setRequestChannel(channel); + assertEquals(JmsInboundGateway.class, gateway.getClass()); context.start(); Message message = channel.receive(3000); assertNotNull("message should not be null", message); diff --git a/org.springframework.integration.jms/src/test/java/org/springframework/integration/jms/config/jmsGatewayTransactionManagerTests.xml b/org.springframework.integration.jms/src/test/java/org/springframework/integration/jms/config/jmsGatewayTransactionManagerTests.xml index 09295856eb..8912ed6423 100644 --- a/org.springframework.integration.jms/src/test/java/org/springframework/integration/jms/config/jmsGatewayTransactionManagerTests.xml +++ b/org.springframework.integration.jms/src/test/java/org/springframework/integration/jms/config/jmsGatewayTransactionManagerTests.xml @@ -10,7 +10,9 @@ http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms-1.0.xsd"> - + + + - + + + - + + + - + + + - + + + - + + + - + + +