general poslihing in tests for FTP/SFTP and javadocs polishing in DefaultHttpHeaderMapper
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
remote-directory="/foo"
|
||||
local-directory="file:local-test-dir"
|
||||
auto-create-local-directory="false"
|
||||
remote-file-separator="/"
|
||||
remote-file-separator="."
|
||||
delete-remote-files="false">
|
||||
<poller fixed-rate="1000"/>
|
||||
</sftp:inbound-channel-adapter>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.integration.sftp.config;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.assertFalse;
|
||||
import static junit.framework.Assert.assertNotNull;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
@@ -33,6 +34,7 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.core.PollableChannel;
|
||||
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
|
||||
import org.springframework.integration.sftp.inbound.SftpInboundFileSynchronizer;
|
||||
import org.springframework.integration.sftp.inbound.SftpInboundFileSynchronizingMessageSource;
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
|
||||
@@ -57,6 +59,10 @@ public class InboundChannelAdapaterParserTests {
|
||||
SftpInboundFileSynchronizingMessageSource source =
|
||||
(SftpInboundFileSynchronizingMessageSource) TestUtils.getPropertyValue(adapter, "source");
|
||||
assertNotNull(source);
|
||||
SftpInboundFileSynchronizer synchronizer = (SftpInboundFileSynchronizer) TestUtils.getPropertyValue(source, "synchronizer");
|
||||
String remoteFileSeparator = (String) TestUtils.getPropertyValue(synchronizer, "remoteFileSeparator");
|
||||
assertNotNull(remoteFileSeparator);
|
||||
assertEquals(".", remoteFileSeparator);
|
||||
PollableChannel requestChannel = context.getBean("requestChannel", PollableChannel.class);
|
||||
assertNotNull(requestChannel.receive(2000));
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
channel="inputChannel"
|
||||
charset="UTF-8"
|
||||
remote-filename-generator="fileNameGenerator"
|
||||
remote-file-separator="/"
|
||||
remote-file-separator="."
|
||||
remote-directory="foo/bar"/>
|
||||
|
||||
<int-sftp:outbound-channel-adapter id="sftpOutboundAdapterWithExpression"
|
||||
|
||||
@@ -50,6 +50,9 @@ public class OutboundChannelAdapaterParserTests {
|
||||
assertEquals(context.getBean("inputChannel"), TestUtils.getPropertyValue(consumer, "inputChannel"));
|
||||
assertEquals("sftpOutboundAdapter", ((EventDrivenConsumer)consumer).getComponentName());
|
||||
FileTransferringMessageHandler handler = (FileTransferringMessageHandler) TestUtils.getPropertyValue(consumer, "handler");
|
||||
String remoteFileSeparator = (String) TestUtils.getPropertyValue(handler, "remoteFileSeparator");
|
||||
assertNotNull(remoteFileSeparator);
|
||||
assertEquals(".", remoteFileSeparator);
|
||||
Expression remoteDirectoryExpression = (Expression) TestUtils.getPropertyValue(handler, "directoryExpressionProcessor.expression");
|
||||
assertNotNull(remoteDirectoryExpression);
|
||||
assertTrue(remoteDirectoryExpression instanceof LiteralExpression);
|
||||
|
||||
Reference in New Issue
Block a user