Search in sources :

Example 1 with DefaultFtpsSessionFactory

use of org.springframework.integration.ftp.session.DefaultFtpsSessionFactory in project spring-integration by spring-projects.

the class FtpsOutboundChannelAdapterParserTests method testFtpsOutboundChannelAdapterComplete.

@Test
public void testFtpsOutboundChannelAdapterComplete() throws Exception {
    assertTrue(ftpOutbound instanceof EventDrivenConsumer);
    assertEquals(this.ftpChannel, TestUtils.getPropertyValue(ftpOutbound, "inputChannel"));
    assertEquals("ftpOutbound", ftpOutbound.getComponentName());
    FileTransferringMessageHandler<?> handler = TestUtils.getPropertyValue(ftpOutbound, "handler", FileTransferringMessageHandler.class);
    assertEquals(this.fileNameGenerator, TestUtils.getPropertyValue(handler, "remoteFileTemplate.fileNameGenerator"));
    assertEquals("UTF-8", TestUtils.getPropertyValue(handler, "remoteFileTemplate.charset"));
    DefaultFtpsSessionFactory sf = TestUtils.getPropertyValue(handler, "remoteFileTemplate.sessionFactory", DefaultFtpsSessionFactory.class);
    assertEquals("localhost", TestUtils.getPropertyValue(sf, "host"));
    assertEquals(22, TestUtils.getPropertyValue(sf, "port"));
}
Also used : EventDrivenConsumer(org.springframework.integration.endpoint.EventDrivenConsumer) DefaultFtpsSessionFactory(org.springframework.integration.ftp.session.DefaultFtpsSessionFactory) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 EventDrivenConsumer (org.springframework.integration.endpoint.EventDrivenConsumer)1 DefaultFtpsSessionFactory (org.springframework.integration.ftp.session.DefaultFtpsSessionFactory)1