FtpClientSession client = FtpTestConfig.getTestFtpClient();
client.connect();
{
CmdList cmdList = new CmdList();
assertEquals(FtpConst.Replyes.REPLY_530, client.executeCommand(cmdList));
}
{
CmdUser cmdUser = new CmdUser(FtpTestConfig.USER_ID);
assertEquals(FtpConst.Replyes.REPLY_331, client.executeCommand(cmdUser));
}
{
CmdPass cmdPass = new CmdPass(FtpTestConfig.USER_PASS);
assertEquals(FtpConst.Replyes.REPLY_230, client.executeCommand(cmdPass));
}
{
CmdList cmdList = new CmdList();
assertEquals(FtpConst.Replyes.REPLY_425, client.executeCommand(cmdList));
}
{
{
CmdPasv cmdPasv = new CmdPasv();
assertEquals(FtpConst.Replyes.REPLY_227, client.executeCommand(cmdPasv));
}
{
CmdList cmdList = new CmdList("NotExistFolder");
assertEquals(FtpConst.Replyes.REPLY_450, client.executeCommand(cmdList));
}
}
{
{
CmdPasv cmdPasv = new CmdPasv();
assertEquals(FtpConst.Replyes.REPLY_227, client.executeCommand(cmdPasv));
}
// Normal executing replies sequence 125..226
// 125 used in List command inside
{
CmdList cmdList = new CmdList();
assertEquals(FtpConst.Replyes.REPLY_226, client.executeCommand(cmdList));
}
}
client.close();