This commit is contained in:
Mark Fisher
2011-12-20 12:44:03 -05:00
parent 41be270170
commit 77abc55a1e
44 changed files with 410 additions and 314 deletions

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.aggregator;
import org.junit.Test;
@@ -29,7 +30,7 @@ import static org.junit.Assert.assertThat;
/**
* @author Iwein Fuld
*/
public class ResequencingMessageGroupProcessorTest {
public class ResequencingMessageGroupProcessorTests {
private ResequencingMessageGroupProcessor processor = new ResequencingMessageGroupProcessor();

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.aggregator.integration;
import org.junit.Test;
@@ -30,14 +31,15 @@ import org.springframework.integration.test.util.TestUtils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
/**
* @author Oleg Zhurakousky
*/
public class ResequencerIntegrationTest {
public class ResequencerIntegrationTests {
@Test
public void validateUnboundedResequencerLight(){
ApplicationContext context = new ClassPathXmlApplicationContext("ResequencerIntegrationTest-context.xml", ResequencerIntegrationTest.class);
ApplicationContext context = new ClassPathXmlApplicationContext("ResequencerIntegrationTest-context.xml", ResequencerIntegrationTests.class);
MessageChannel inputChannel = context .getBean("resequencerLightInput", MessageChannel.class);
QueueChannel outputChannel = context .getBean("outputChannel", QueueChannel.class);
EventDrivenConsumer edc = context.getBean("resequencerLight", EventDrivenConsumer.class);
@@ -90,7 +92,7 @@ public class ResequencerIntegrationTest {
@Test
public void validateUnboundedResequencerDeep(){
ApplicationContext context = new ClassPathXmlApplicationContext("ResequencerIntegrationTest-context.xml", ResequencerIntegrationTest.class);
ApplicationContext context = new ClassPathXmlApplicationContext("ResequencerIntegrationTest-context.xml", ResequencerIntegrationTests.class);
MessageChannel inputChannel = context .getBean("resequencerDeepInput", MessageChannel.class);
QueueChannel outputChannel = context .getBean("outputChannel", QueueChannel.class);
EventDrivenConsumer edc = context.getBean("resequencerDeep", EventDrivenConsumer.class);

View File

@@ -6,10 +6,9 @@
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd">
<int:gateway id="sampleGateway"
service-interface="org.springframework.integration.gateway.GatewayInterfaceTest.Bar"
service-interface="org.springframework.integration.gateway.GatewayInterfaceTests.Bar"
default-request-channel="requestChannelBaz"/>
<int:channel id="requestChannelFoo"/>
<int:channel id="requestChannelBar"/>
<int:channel id="requestChannelBaz"/>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.gateway;
import static junit.framework.Assert.assertEquals;
@@ -35,13 +36,12 @@ import org.springframework.integration.core.MessageHandler;
/**
* @author Oleg Zhurakousky
*
*/
public class GatewayInterfaceTest {
public class GatewayInterfaceTests {
@Test
public void testWithServiceSuperclassAnnotatedMethod(){
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTest-context.xml", this.getClass());
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTests-context.xml", this.getClass());
DirectChannel channel = ac.getBean("requestChannelFoo", DirectChannel.class);
MessageHandler handler = mock(MessageHandler.class);
channel.subscribe(handler);
@@ -52,7 +52,7 @@ public class GatewayInterfaceTest {
@Test
public void testWithServiceAnnotatedMethod(){
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTest-context.xml", this.getClass());
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTests-context.xml", this.getClass());
DirectChannel channel = ac.getBean("requestChannelBar", DirectChannel.class);
MessageHandler handler = mock(MessageHandler.class);
channel.subscribe(handler);
@@ -63,7 +63,7 @@ public class GatewayInterfaceTest {
@Test
public void testWithServiceSuperclassUnAnnotatedMethod(){
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTest-context.xml", this.getClass());
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTests-context.xml", this.getClass());
DirectChannel channel = ac.getBean("requestChannelBaz", DirectChannel.class);
MessageHandler handler = mock(MessageHandler.class);
channel.subscribe(handler);
@@ -74,7 +74,7 @@ public class GatewayInterfaceTest {
@Test
public void testWithServiceCastAsSuperclassAnnotatedMethod(){
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTest-context.xml", this.getClass());
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTests-context.xml", this.getClass());
DirectChannel channel = ac.getBean("requestChannelFoo", DirectChannel.class);
MessageHandler handler = mock(MessageHandler.class);
channel.subscribe(handler);
@@ -85,7 +85,7 @@ public class GatewayInterfaceTest {
@Test
public void testWithServiceCastAsSuperclassUnAnnotatedMethod(){
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTest-context.xml", this.getClass());
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTests-context.xml", this.getClass());
DirectChannel channel = ac.getBean("requestChannelBaz", DirectChannel.class);
MessageHandler handler = mock(MessageHandler.class);
channel.subscribe(handler);
@@ -96,7 +96,7 @@ public class GatewayInterfaceTest {
@Test
public void testWithServiceHashcode() throws Exception{
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTest-context.xml", this.getClass());
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTests-context.xml", this.getClass());
DirectChannel channel = ac.getBean("requestChannelBaz", DirectChannel.class);
MessageHandler handler = mock(MessageHandler.class);
channel.subscribe(handler);
@@ -107,7 +107,7 @@ public class GatewayInterfaceTest {
@Test
public void testWithServiceToString(){
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTest-context.xml", this.getClass());
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTests-context.xml", this.getClass());
DirectChannel channel = ac.getBean("requestChannelBaz", DirectChannel.class);
MessageHandler handler = mock(MessageHandler.class);
channel.subscribe(handler);
@@ -118,7 +118,7 @@ public class GatewayInterfaceTest {
@Test
public void testWithServiceEquals() throws Exception{
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTest-context.xml", this.getClass());
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTests-context.xml", this.getClass());
DirectChannel channel = ac.getBean("requestChannelBaz", DirectChannel.class);
MessageHandler handler = mock(MessageHandler.class);
channel.subscribe(handler);
@@ -137,7 +137,7 @@ public class GatewayInterfaceTest {
@Test
public void testWithServiceGetClass(){
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTest-context.xml", this.getClass());
ApplicationContext ac = new ClassPathXmlApplicationContext("GatewayInterfaceTests-context.xml", this.getClass());
DirectChannel channel = ac.getBean("requestChannelBaz", DirectChannel.class);
MessageHandler handler = mock(MessageHandler.class);
channel.subscribe(handler);