Exemple #1
0
        public void TestWhiteList()
        {
            FtpsOptions options = new FtpsOptions();

            options.Host            = host;
            options.User            = user;
            options.Password        = password;
            options.Port            = port;
            options.ForceEncryption = forceEncryption;
            options.ConnectionMode  = connectionMode;
            options.EncryptionMode  = encryptionMode;
            options.Protocol        = protocol;
            options.WhiteList       = whiteList;
            FtpsClient client = TestConnection(options);
            bool       put    = client.Put(imagePath, remoteDir);

            Assert.IsFalse(put);
            Assert.IsTrue(client.HasError());
            client.Disconnect();
        }
        private void TestPut(FtpsClient client)
        {
            bool put = client.Put(localPath, remoteDir);

            True(put, client);
        }