use of org.springframework.integration.endpoint.SourcePollingChannelAdapter in project spring-integration by spring-projects.
the class FeedInboundChannelAdapterParserTests method testAutoChannel.
@Test
public void testAutoChannel() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("FeedInboundChannelAdapterParserTests-autoChannel-context.xml", this.getClass());
MessageChannel autoChannel = context.getBean("autoChannel", MessageChannel.class);
SourcePollingChannelAdapter adapter = context.getBean("autoChannel.adapter", SourcePollingChannelAdapter.class);
assertSame(autoChannel, TestUtils.getPropertyValue(adapter, "outputChannel"));
context.close();
}
use of org.springframework.integration.endpoint.SourcePollingChannelAdapter in project spring-integration by spring-projects.
the class FeedInboundChannelAdapterParserTests method validateSuccessfulFileConfigurationWithCustomMetadataStore.
@Test
public void validateSuccessfulFileConfigurationWithCustomMetadataStore() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("FeedInboundChannelAdapterParserTests-file-context.xml", this.getClass());
SourcePollingChannelAdapter adapter = context.getBean("feedAdapter", SourcePollingChannelAdapter.class);
FeedEntryMessageSource source = (FeedEntryMessageSource) TestUtils.getPropertyValue(adapter, "source");
assertSame(context.getBean(MetadataStore.class), TestUtils.getPropertyValue(source, "metadataStore"));
SyndFeedInput syndFeedInput = TestUtils.getPropertyValue(source, "syndFeedInput", SyndFeedInput.class);
assertSame(context.getBean(SyndFeedInput.class), syndFeedInput);
assertFalse(syndFeedInput.isPreserveWireFeed());
context.close();
}
use of org.springframework.integration.endpoint.SourcePollingChannelAdapter in project spring-integration by spring-projects.
the class StoredProcPollingChannelAdapterParserTests method testAutoChannel.
@Test
public void testAutoChannel() throws Exception {
setUp("storedProcPollingChannelAdapterParserTest.xml", getClass());
MessageChannel autoChannel = context.getBean("autoChannel", MessageChannel.class);
SourcePollingChannelAdapter autoChannelAdapter = context.getBean("autoChannel.adapter", SourcePollingChannelAdapter.class);
assertSame(autoChannel, TestUtils.getPropertyValue(autoChannelAdapter, "outputChannel"));
assertFalse(TestUtils.getPropertyValue(autoChannelAdapter, "source.executor.returnValueRequired", Boolean.class));
assertFalse(TestUtils.getPropertyValue(autoChannelAdapter, "source.executor.isFunction", Boolean.class));
autoChannelAdapter.stop();
}
use of org.springframework.integration.endpoint.SourcePollingChannelAdapter in project spring-integration by spring-projects.
the class JdbcPollingChannelAdapterParserTests method testAutoChannel.
@Test
public void testAutoChannel() {
setUp("autoChannelJdbcPollingChannelAdapterParserTests-context.xml", getClass());
MessageChannel autoChannel = appCtx.getBean("autoChannel", MessageChannel.class);
SourcePollingChannelAdapter autoChannelAdapter = appCtx.getBean("autoChannel.adapter", SourcePollingChannelAdapter.class);
assertSame(autoChannel, TestUtils.getPropertyValue(autoChannelAdapter, "outputChannel"));
}
use of org.springframework.integration.endpoint.SourcePollingChannelAdapter in project spring-integration by spring-projects.
the class InboundChannelAdapterParserTests method testAutoStartup.
@Test
public void testAutoStartup() throws Exception {
ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("SftpInboundAutostartup-context.xml", this.getClass());
SourcePollingChannelAdapter adapter = context.getBean("sftpAutoStartup", SourcePollingChannelAdapter.class);
assertFalse(adapter.isRunning());
context.close();
}
Aggregations