general poslihing in tests for FTP/SFTP and javadocs polishing in DefaultHttpHeaderMapper

This commit is contained in:
Oleg Zhurakousky
2011-01-17 15:07:57 -05:00
parent a0735fd67a
commit 893d749907
10 changed files with 23 additions and 7 deletions

View File

@@ -25,7 +25,6 @@ import org.apache.commons.logging.LogFactory;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPFile;
import org.springframework.integration.file.FileWritingMessageHandler;
import org.springframework.integration.file.remote.session.Session;
import org.springframework.util.Assert;

View File

@@ -18,7 +18,7 @@
delete-remote-files="true"
filename-pattern="*.txt"
local-directory="."
remote-file-separator="/"
remote-file-separator="."
remote-directory="foo/bar">
<int:poller fixed-rate="1000"/>
</int-ftp:inbound-channel-adapter>

View File

@@ -55,6 +55,9 @@ public class FtpInboundChannelAdapterParserTests {
FtpInboundFileSynchronizer fisync =
(FtpInboundFileSynchronizer) TestUtils.getPropertyValue(inbound, "synchronizer");
String remoteFileSeparator = (String) TestUtils.getPropertyValue(fisync, "remoteFileSeparator");
assertNotNull(remoteFileSeparator);
assertEquals(".", remoteFileSeparator);
FtpSimplePatternFileListFilter filter = (FtpSimplePatternFileListFilter) TestUtils.getPropertyValue(fisync, "filter");
assertNotNull(filter);
}

View File

@@ -21,7 +21,7 @@
session-factory="ftpSessionFactory"
remote-directory="foo/bar"
charset="UTF-8"
remote-file-separator="/"
remote-file-separator="."
remote-filename-generator="fileNameGenerator"/>
<int:channel id="ftpChannel"/>

View File

@@ -45,6 +45,9 @@ public class FtpOutboundChannelAdapterParserTests {
assertEquals(ac.getBean("ftpChannel"), TestUtils.getPropertyValue(consumer, "inputChannel"));
assertEquals("ftpOutbound", ((EventDrivenConsumer)consumer).getComponentName());
FileTransferringMessageHandler handler = (FileTransferringMessageHandler) TestUtils.getPropertyValue(consumer, "handler");
String remoteFileSeparator = (String) TestUtils.getPropertyValue(handler, "remoteFileSeparator");
assertNotNull(remoteFileSeparator);
assertEquals(".", remoteFileSeparator);
assertEquals(ac.getBean("fileNameGenerator"), TestUtils.getPropertyValue(handler, "fileNameGenerator"));
assertEquals("UTF-8", TestUtils.getPropertyValue(handler, "charset"));
assertNotNull(TestUtils.getPropertyValue(handler, "temporaryDirectory"));