Package org.exoplatform.frameworks.ftpclient.commands

Examples of org.exoplatform.frameworks.ftpclient.commands.CmdNlst


      assertEquals(FtpConst.Replyes.REPLY_331, client.executeCommand(new CmdUser("admin")));
      assertEquals(FtpConst.Replyes.REPLY_230, client.executeCommand(new CmdPass("admin")));
      assertEquals(FtpConst.Replyes.REPLY_215, client.executeCommand(new CmdSyst()));
      assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(new CmdCwd("production")));
      assertEquals(FtpConst.Replyes.REPLY_227, client.executeCommand(new CmdPasv()));
      assertEquals(FtpConst.Replyes.REPLY_226, client.executeCommand(new CmdNlst()));

      client.close();

      log.info("Complete.");
   }
View Full Code Here


      FtpClientSession client = FtpTestConfig.getTestFtpClient();
      client.connect();

      {
         CmdNlst cmdNlst = new CmdNlst();
         assertEquals(FtpConst.Replyes.REPLY_530, client.executeCommand(cmdNlst));
      }

      {
         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));
      }

      {
         CmdNlst cmdNlst = new CmdNlst();
         assertEquals(FtpConst.Replyes.REPLY_425, client.executeCommand(cmdNlst));
      }

      {
         {
            CmdPasv cmdPasv = new CmdPasv();
            assertEquals(FtpConst.Replyes.REPLY_227, client.executeCommand(cmdPasv));
         }

         {
            CmdNlst cmdNlst = new CmdNlst("NotExistFolder");
            assertEquals(FtpConst.Replyes.REPLY_450, client.executeCommand(cmdNlst));
         }
      }

      {
         {
            CmdPasv cmdPasv = new CmdPasv();
            assertEquals(FtpConst.Replyes.REPLY_227, client.executeCommand(cmdPasv));
         }

         // Normal executing replies sequence 125..226
         // 125 used in NLst command inside
         {
            CmdNlst cmdNlst = new CmdNlst();
            assertEquals(FtpConst.Replyes.REPLY_226, client.executeCommand(cmdNlst));
         }
      }

      client.close();
View Full Code Here

TOP

Related Classes of org.exoplatform.frameworks.ftpclient.commands.CmdNlst

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.