INT-3204 RemoteFileTemplate Phase II Part 1
- AbstractInboundFileSynchronizer INT-3204 RemoteFileTemplate Phase II, Part 2 - AbstractRemoteFileOutboundGateway - Encapsulate Session.readRaw and .finalizeRaw in template.get() INT-3204 Polishing - PR Comments JIRA: https://jira.springsource.org/browse/INT-3204 INT-3204: Polishing
This commit is contained in:
committed by
Artem Bilan
parent
d662e7ee42
commit
1d0c28852f
@@ -46,7 +46,7 @@ public class InboundChannelAdapterParserCachingTests {
|
||||
|
||||
@Test
|
||||
public void cachingAdapter() {
|
||||
Object sessionFactory = TestUtils.getPropertyValue(cachingAdapter, "source.synchronizer.sessionFactory");
|
||||
Object sessionFactory = TestUtils.getPropertyValue(cachingAdapter, "source.synchronizer.remoteFileTemplate.sessionFactory");
|
||||
assertEquals(CachingSessionFactory.class, sessionFactory.getClass());
|
||||
Properties sessionConfig = TestUtils.getPropertyValue(sessionFactory, "sessionFactory.sessionConfig", Properties.class);
|
||||
assertNotNull(sessionConfig);
|
||||
@@ -55,7 +55,7 @@ public class InboundChannelAdapterParserCachingTests {
|
||||
|
||||
@Test
|
||||
public void nonCachingAdapter() {
|
||||
Object sessionFactory = TestUtils.getPropertyValue(nonCachingAdapter, "source.synchronizer.sessionFactory");
|
||||
Object sessionFactory = TestUtils.getPropertyValue(nonCachingAdapter, "source.synchronizer.remoteFileTemplate.sessionFactory");
|
||||
assertEquals(DefaultSftpSessionFactory.class, sessionFactory.getClass());
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
@@ -73,7 +72,7 @@ public class SftpOutboundGatewayParserTests {
|
||||
SftpOutboundGateway gateway = TestUtils.getPropertyValue(gateway1,
|
||||
"handler", SftpOutboundGateway.class);
|
||||
assertEquals("X", TestUtils.getPropertyValue(gateway, "remoteFileSeparator"));
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "sessionFactory"));
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "remoteFileTemplate.sessionFactory"));
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "outputChannel"));
|
||||
assertEquals("local-test-dir", TestUtils.getPropertyValue(gateway, "localDirectoryExpression.literalValue"));
|
||||
assertFalse((Boolean) TestUtils.getPropertyValue(gateway, "autoCreateLocalDirectory"));
|
||||
@@ -94,8 +93,8 @@ public class SftpOutboundGatewayParserTests {
|
||||
SftpOutboundGateway gateway = TestUtils.getPropertyValue(gateway2,
|
||||
"handler", SftpOutboundGateway.class);
|
||||
assertEquals("X", TestUtils.getPropertyValue(gateway, "remoteFileSeparator"));
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "sessionFactory"));
|
||||
assertTrue(TestUtils.getPropertyValue(gateway, "sessionFactory") instanceof CachingSessionFactory);
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "remoteFileTemplate.sessionFactory"));
|
||||
assertTrue(TestUtils.getPropertyValue(gateway, "remoteFileTemplate.sessionFactory") instanceof CachingSessionFactory);
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "outputChannel"));
|
||||
assertEquals("local-test-dir", TestUtils.getPropertyValue(gateway, "localDirectoryExpression.literalValue"));
|
||||
assertFalse((Boolean) TestUtils.getPropertyValue(gateway, "autoCreateLocalDirectory"));
|
||||
@@ -125,7 +124,7 @@ public class SftpOutboundGatewayParserTests {
|
||||
public void testGatewayMv() {
|
||||
SftpOutboundGateway gateway = TestUtils.getPropertyValue(gateway3,
|
||||
"handler", SftpOutboundGateway.class);
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "sessionFactory"));
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "remoteFileTemplate.sessionFactory"));
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "outputChannel"));
|
||||
assertEquals(Command.MV, TestUtils.getPropertyValue(gateway, "command"));
|
||||
assertEquals("'foo'", TestUtils.getPropertyValue(gateway, "renameProcessor.expression.expression"));
|
||||
|
||||
Reference in New Issue
Block a user