use of com.adaptris.filetransfer.FileTransferClient in project interlok by adaptris.
the class StandardSftpConnectionTest method testConnectOnly_Composite.
@Test
public void testConnectOnly_Composite() throws Exception {
Assume.assumeTrue(areTestsEnabled());
StandardSftpConnection conn = createConnection();
try {
SftpAuthenticationWrapper auth = new SftpAuthenticationWrapper(new SftpKeyAuthentication(PROPERTIES.getProperty(CFG_PRIVATE_KEY_FILE), "PW:abde"), new SftpKeyAuthentication(PROPERTIES.getProperty(CFG_PRIVATE_KEY_FILE), PROPERTIES.getProperty(CFG_PRIVATE_KEY_PW)));
conn.setAuthentication(auth);
start(conn);
FileTransferClient c = conn.connect(getDestinationString());
assertTrue(c.isConnected());
c.disconnect();
} finally {
stop(conn);
}
}
use of com.adaptris.filetransfer.FileTransferClient in project interlok by adaptris.
the class StandardSftpConnectionTest method testConnectOnly_PasswordAuth.
@Test
public void testConnectOnly_PasswordAuth() throws Exception {
Assume.assumeTrue(areTestsEnabled());
StandardSftpConnection conn = createConnection();
try {
conn.setAuthentication(new SftpPasswordAuthentication(PROPERTIES.getProperty(CFG_PASSWORD)));
start(conn);
FileTransferClient c = conn.connect(getDestinationString());
assertTrue(c.isConnected());
c.disconnect();
} finally {
stop(conn);
}
}
use of com.adaptris.filetransfer.FileTransferClient in project interlok by adaptris.
the class StandardSftpConnectionTest method testConnectOnly_KeyAuth.
@Test
public void testConnectOnly_KeyAuth() throws Exception {
Assume.assumeTrue(areTestsEnabled());
StandardSftpConnection conn = createConnection();
try {
start(conn);
FileTransferClient c = conn.connect(getDestinationString());
assertTrue(c.isConnected());
c.disconnect();
} finally {
stop(conn);
}
}
use of com.adaptris.filetransfer.FileTransferClient in project interlok by adaptris.
the class FtpPasswordConnectionCase method testConnect_EncodedPassword.
@Test
public void testConnect_EncodedPassword() throws Exception {
Assume.assumeTrue(areTestsEnabled());
FileTransferConnectionUsingPassword connection = (FileTransferConnectionUsingPassword) createConnection();
String ensureEncodedPassword = Password.encode(Password.decode(connection.getDefaultPassword()), Password.PORTABLE_PASSWORD);
connection.setDefaultPassword(ensureEncodedPassword);
try {
start(connection);
FileTransferClient client = connection.connect(getDestinationString());
} finally {
stop(connection);
}
}
Aggregations