FtpClientSession client = FtpTestConfig.getTestFtpClient();
client.connect();
{
CmdMkd cmdMkd = new CmdMkd("");
assertEquals(FtpConst.Replyes.REPLY_530, client.executeCommand(cmdMkd));
}
{
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));
}
{
CmdMkd cmdMkd = new CmdMkd("");
assertEquals(FtpConst.Replyes.REPLY_500, client.executeCommand(cmdMkd));
}
{
CmdMkd cmdMkd = new CmdMkd("myfolder");
assertEquals(FtpConst.Replyes.REPLY_550, client.executeCommand(cmdMkd));
}
{
CmdCwd cmdCwd = new CmdCwd("production");
assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdCwd));
String folderName = "test_folder_" + System.currentTimeMillis();
CmdMkd cmdMkd = new CmdMkd(folderName);
assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdMkd));
CmdRmd cmdRmd = new CmdRmd(folderName);
assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdRmd));
}