Changed names in test code to match name changes for JmsSource and JmsGateway.
This commit is contained in:
@@ -37,10 +37,10 @@ public class JmsGatewayParserTests {
|
||||
@Test
|
||||
public void testGatewayWithConnectionFactoryAndDestination() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"messageDrivenAdapterWithConnectionFactoryAndDestination.xml", this.getClass());
|
||||
"jmsGatewayWithConnectionFactoryAndDestination.xml", this.getClass());
|
||||
MessageChannel channel = new QueueChannel(1);
|
||||
JmsGateway source = (JmsGateway) context.getBean("jmsSource");
|
||||
source.setRequestChannel(channel);
|
||||
JmsGateway gateway = (JmsGateway) context.getBean("jmsGateway");
|
||||
gateway.setRequestChannel(channel);
|
||||
context.start();
|
||||
Message<?> message = channel.receive(3000);
|
||||
assertNotNull("message should not be null", message);
|
||||
@@ -51,12 +51,11 @@ public class JmsGatewayParserTests {
|
||||
@Test
|
||||
public void testGatewayWithConnectionFactoryAndDestinationName() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"messageDrivenAdapterWithConnectionFactoryAndDestinationName.xml", this.getClass());
|
||||
"jmsGatewayWithConnectionFactoryAndDestinationName.xml", this.getClass());
|
||||
MessageChannel channel = new QueueChannel(1);
|
||||
JmsGateway source = (JmsGateway) context.getBean("jmsSource");
|
||||
source.setRequestChannel(channel);
|
||||
JmsGateway gateway = (JmsGateway) context.getBean("jmsGateway");
|
||||
gateway.setRequestChannel(channel);
|
||||
context.start();
|
||||
assertEquals(JmsGateway.class, source.getClass());
|
||||
Message<?> message = channel.receive(3000);
|
||||
assertNotNull("message should not be null", message);
|
||||
assertEquals("message-driven-test", message.getPayload());
|
||||
@@ -66,10 +65,10 @@ public class JmsGatewayParserTests {
|
||||
@Test
|
||||
public void testGatewayWithMessageConverter() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"messageDrivenAdapterWithMessageConverter.xml", this.getClass());
|
||||
"jmsGatewayWithMessageConverter.xml", this.getClass());
|
||||
MessageChannel channel = new QueueChannel(1);
|
||||
JmsGateway source = (JmsGateway) context.getBean("jmsSource");
|
||||
source.setRequestChannel(channel);
|
||||
JmsGateway gateway = (JmsGateway) context.getBean("jmsGateway");
|
||||
gateway.setRequestChannel(channel);
|
||||
context.start();
|
||||
Message<?> message = channel.receive(3000);
|
||||
assertNotNull("message should not be null", message);
|
||||
@@ -80,7 +79,7 @@ public class JmsGatewayParserTests {
|
||||
@Test(expected=BeanDefinitionStoreException.class)
|
||||
public void testGatewayWithConnectionFactoryOnly() {
|
||||
try {
|
||||
new ClassPathXmlApplicationContext("messageDrivenAdapterWithConnectionFactoryOnly.xml", this.getClass());
|
||||
new ClassPathXmlApplicationContext("jmsGatewayWithConnectionFactoryOnly.xml", this.getClass());
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
assertEquals(BeanCreationException.class, e.getCause().getClass());
|
||||
@@ -91,7 +90,7 @@ public class JmsGatewayParserTests {
|
||||
@Test(expected=BeanDefinitionStoreException.class)
|
||||
public void testGatewayWithEmptyConnectionFactory() {
|
||||
try {
|
||||
new ClassPathXmlApplicationContext("messageDrivenAdapterWithEmptyConnectionFactory.xml", this.getClass());
|
||||
new ClassPathXmlApplicationContext("jmsGatewayWithEmptyConnectionFactory.xml", this.getClass());
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
assertEquals(BeanCreationException.class, e.getCause().getClass());
|
||||
@@ -102,10 +101,10 @@ public class JmsGatewayParserTests {
|
||||
@Test
|
||||
public void testGatewayWithDefaultConnectionFactory() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"messageDrivenAdapterWithDefaultConnectionFactory.xml", this.getClass());
|
||||
"jmsGatewayWithDefaultConnectionFactory.xml", this.getClass());
|
||||
MessageChannel channel = new QueueChannel(1);
|
||||
JmsGateway source = (JmsGateway) context.getBean("jmsSource");
|
||||
source.setRequestChannel(channel);
|
||||
JmsGateway gateway = (JmsGateway) context.getBean("jmsGateway");
|
||||
gateway.setRequestChannel(channel);
|
||||
context.start();
|
||||
Message<?> message = channel.receive(3000);
|
||||
assertNotNull("message should not be null", message);
|
||||
|
||||
@@ -38,7 +38,7 @@ public class JmsSourceParserTests {
|
||||
@Test
|
||||
public void testSourceWithJmsTemplate() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"pollingAdapterWithJmsTemplate.xml", this.getClass());
|
||||
"jmsSourceWithJmsTemplate.xml", this.getClass());
|
||||
JmsSource source = (JmsSource) context.getBean("jmsSource");
|
||||
Message<?> message = source.receive();
|
||||
assertNotNull("message should not be null", message);
|
||||
@@ -48,7 +48,7 @@ public class JmsSourceParserTests {
|
||||
@Test
|
||||
public void testSourceWithConnectionFactoryAndDestination() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"pollingAdapterWithConnectionFactoryAndDestination.xml", this.getClass());
|
||||
"jmsSourceWithConnectionFactoryAndDestination.xml", this.getClass());
|
||||
JmsSource source = (JmsSource) context.getBean("jmsSource");
|
||||
Message<?> message = source.receive();
|
||||
assertNotNull("message should not be null", message);
|
||||
@@ -59,7 +59,7 @@ public class JmsSourceParserTests {
|
||||
@Test
|
||||
public void testSourceWithConnectionFactoryAndDestinationName() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"pollingAdapterWithConnectionFactoryAndDestinationName.xml", this.getClass());
|
||||
"jmsSourceWithConnectionFactoryAndDestinationName.xml", this.getClass());
|
||||
JmsSource source = (JmsSource) context.getBean("jmsSource");
|
||||
Message<?> message = source.receive();
|
||||
assertNotNull("message should not be null", message);
|
||||
@@ -70,7 +70,7 @@ public class JmsSourceParserTests {
|
||||
@Test(expected=BeanDefinitionStoreException.class)
|
||||
public void testSourceWithConnectionFactoryOnly() {
|
||||
try {
|
||||
new ClassPathXmlApplicationContext("pollingAdapterWithConnectionFactoryOnly.xml", this.getClass());
|
||||
new ClassPathXmlApplicationContext("jmsSourceWithConnectionFactoryOnly.xml", this.getClass());
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
assertEquals(BeanCreationException.class, e.getCause().getClass());
|
||||
@@ -81,7 +81,7 @@ public class JmsSourceParserTests {
|
||||
@Test(expected=BeanCreationException.class)
|
||||
public void testSourceWithDestinationOnly() {
|
||||
try {
|
||||
new ClassPathXmlApplicationContext("pollingAdapterWithDestinationOnly.xml", this.getClass());
|
||||
new ClassPathXmlApplicationContext("jmsSourceWithDestinationOnly.xml", this.getClass());
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
assertEquals(NoSuchBeanDefinitionException.class, e.getCause().getClass());
|
||||
@@ -92,7 +92,7 @@ public class JmsSourceParserTests {
|
||||
@Test
|
||||
public void testSourceWithDestinationAndDefaultConnectionFactory() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"pollingAdapterWithDestinationAndDefaultConnectionFactory.xml", this.getClass());
|
||||
"jmsSourceWithDestinationAndDefaultConnectionFactory.xml", this.getClass());
|
||||
JmsSource source = (JmsSource) context.getBean("jmsSource");
|
||||
Message<?> message = source.receive();
|
||||
assertNotNull("message should not be null", message);
|
||||
@@ -101,14 +101,14 @@ public class JmsSourceParserTests {
|
||||
}
|
||||
|
||||
@Test(expected=BeanCreationException.class)
|
||||
public void testPollingAdapterWithDestinationNameOnly() {
|
||||
new ClassPathXmlApplicationContext("pollingAdapterWithDestinationNameOnly.xml", this.getClass());
|
||||
public void testSourceWithDestinationNameOnly() {
|
||||
new ClassPathXmlApplicationContext("jmsSourceWithDestinationNameOnly.xml", this.getClass());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPollingAdapterWithDestinationNameAndDefaultConnectionFactory() {
|
||||
public void testSourceWithDestinationNameAndDefaultConnectionFactory() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"pollingAdapterWithDestinationNameAndDefaultConnectionFactory.xml", this.getClass());
|
||||
"jmsSourceWithDestinationNameAndDefaultConnectionFactory.xml", this.getClass());
|
||||
JmsSource source = (JmsSource) context.getBean("jmsSource");
|
||||
Message<?> message = source.receive();
|
||||
assertNotNull("message should not be null", message);
|
||||
@@ -118,7 +118,7 @@ public class JmsSourceParserTests {
|
||||
@Test
|
||||
public void testSourceEndpoint() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"pollingJmsSourceEndpoint.xml", this.getClass());
|
||||
"jmsSourceEndpoint.xml", this.getClass());
|
||||
context.start();
|
||||
PollingSourceEndpoint endpoint = (PollingSourceEndpoint) context.getBean("endpoint");
|
||||
assertEquals(JmsSource.class, endpoint.getSource().getClass());
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<si:channel id="requestChannel"/>
|
||||
|
||||
<si:jms-gateway id="jmsSource"
|
||||
<si:jms-gateway id="jmsGateway"
|
||||
connection-factory="testConnectionFactory"
|
||||
destination="testDestination"
|
||||
request-channel="requestChannel"/>
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<si:channel id="requestChannel"/>
|
||||
|
||||
<si:jms-gateway id="jmsSource"
|
||||
<si:jms-gateway id="jmsGateway"
|
||||
connection-factory="testConnectionFactory"
|
||||
destination-name="testDestinationName"
|
||||
request-channel="requestChannel"/>
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<si:channel id="requestChannel"/>
|
||||
|
||||
<si:jms-gateway id="jmsSource"
|
||||
<si:jms-gateway id="jmsGateway"
|
||||
connection-factory="testConnectionFactory"
|
||||
request-channel="requestChannel"/>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<si:channel id="requestChannel"/>
|
||||
|
||||
<si:jms-gateway id="jmsSource"
|
||||
<si:jms-gateway id="jmsGateway"
|
||||
destination-name="testDestinationName"
|
||||
request-channel="requestChannel"/>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<si:channel id="requestChannel"/>
|
||||
|
||||
<si:jms-gateway id="jmsSource"
|
||||
<si:jms-gateway id="jmsGateway"
|
||||
connection-factory=""
|
||||
destination-name="testDestinationName"
|
||||
request-channel="requestChannel"/>
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<si:channel id="requestChannel"/>
|
||||
|
||||
<si:jms-gateway id="jmsSource"
|
||||
<si:jms-gateway id="jmsGateway"
|
||||
connection-factory="testConnectionFactory"
|
||||
destination="testDestination"
|
||||
message-converter="converter"
|
||||
Reference in New Issue
Block a user