INT-1735 cleaned up test

This commit is contained in:
Oleg Zhurakousky
2011-01-05 13:50:12 -05:00
parent 1cbae6d353
commit 2b99849f0c
2 changed files with 4 additions and 12 deletions

View File

@@ -9,10 +9,9 @@
<control-bus input-channel="inputChannel" auto-startup="true"/>
<inbound-channel-adapter id="adapter" channel="outputChannel" auto-startup="false" >
<poller fixed-rate="1000"/>
<inbound-channel-adapter id="adapter" channel="outputChannel" auto-startup="false" method="receive">
<poller fixed-rate="1000"/>
<beans:bean class="org.springframework.integration.config.xml.ControlBusTests.AdapterService"/>
</inbound-channel-adapter>

View File

@@ -24,12 +24,12 @@ import java.util.Date;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.Message;
import org.springframework.integration.MessageChannel;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.core.PollableChannel;
import org.springframework.integration.message.GenericMessage;
import org.springframework.integration.support.MessageBuilder;
@@ -79,15 +79,8 @@ public class ControlBusTests {
}
}
public static class AdapterService implements MessageSource<String>{
// public String produceDate() {
// System.out.println("Producing Date");
// return new Date().toString();
// }
public static class AdapterService {
public Message<String> receive() {
System.out.println("Producing Date");
return new GenericMessage<String>(new Date().toString());
}
}