FtpClientSession client = FtpTestConfig.getTestFtpClient();
client.connect();
{
CmdDele cmdDele = new CmdDele("");
assertEquals(FtpConst.Replyes.REPLY_530, client.executeCommand(cmdDele));
}
{
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));
}
{
CmdDele cmdDele = new CmdDele("");
assertEquals(FtpConst.Replyes.REPLY_500, client.executeCommand(cmdDele));
}
{
CmdDele cmdDele = new CmdDele("NotExistFolder");
assertEquals(FtpConst.Replyes.REPLY_550, client.executeCommand(cmdDele));
}
{
CmdCwd cmdCwd = new CmdCwd("production");
assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdCwd));
}
String folderName = "testFolder_" + System.currentTimeMillis();
{
CmdMkd cmdMkd = new CmdMkd(folderName);
assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdMkd));
}
{
CmdDele cmdDele = new CmdDele(folderName);
assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdDele));
}
client.close();
log.info("Complete.\r\n");