assertEquals(FtpConst.Replyes.REPLY_230, client.executeCommand(cmdPass));
}
// param required
{
CmdMode cmdMode = new CmdMode("");
assertEquals(FtpConst.Replyes.REPLY_500, client.executeCommand(cmdMode));
}
// Mode set to S
{
CmdMode cmdMode = new CmdMode("s");
assertEquals(FtpConst.Replyes.REPLY_200, client.executeCommand(cmdMode));
}
// unsupported modes - c, b
{
CmdMode cmdMode = new CmdMode("c");
assertEquals(FtpConst.Replyes.REPLY_504, client.executeCommand(cmdMode));
}
{
CmdMode cmdMode = new CmdMode("b");
assertEquals(FtpConst.Replyes.REPLY_504, client.executeCommand(cmdMode));
}
// unrecognized modes
{
CmdMode cmdMode = new CmdMode("a");
assertEquals(FtpConst.Replyes.REPLY_501, client.executeCommand(cmdMode));
}
client.close();
log.info("Complete.\r\n");