Ejemplo n.º 1
0
        public void TestMethod_GetFile()
        {
            string file      = @"bunny_20140725_12345678.jpg";
            string localPath = @"D:\FTP\";

            if (File.Exists(Path.Combine(localPath, file)))
            {
                File.Delete(Path.Combine(localPath, file));
            }
            proxyftpClient.GetFile(file, Path.Combine(localPath, file));
            if (File.Exists(Path.Combine(localPath, file)))
            {
                log2.Debug("下載檔案成功: " + Path.Combine(localPath, file));
            }
            else
            {
                log2.Debug("下載檔案失敗: " + Path.Combine(localPath, file));
            }
            Assert.IsTrue(File.Exists(Path.Combine(localPath, file)));
        }