public FtpPurgeRemoteDataTests()
        {
            _remoteFtpServer = "ftp://192.168.0.185";
            _remoteFtpUsr    = "******";
            _remoteFtpPwd    = "carl";
            _remoteRetention = 60;
            _remoteBasePath  = "MySQL";

            var ftpListDirectory = new FtpListDirectory(
                _remoteFtpServer,
                _remoteFtpUsr,
                _remoteFtpPwd
                );

            var ftpDeleteFile = new FtpDeleteFile(
                _remoteFtpServer,
                _remoteFtpUsr,
                _remoteFtpPwd,
                new Logger()
                );

            _ftpListDirectoryOnRemote = new FtpListDirectoryOnRemote()
            {
                FtpListDirectory = ftpListDirectory,
                FtpDeleteFile    = ftpDeleteFile
            };

            var _ftpRemoveDirectory = new FtpRemoveDirectory(
                _remoteFtpServer,
                _remoteFtpUsr,
                _remoteFtpPwd,
                new Logger()
                );

            _ftpPurgeRemoteData = new FtpPurgeRemoteData(
                _ftpListDirectoryOnRemote,
                _ftpRemoveDirectory,
                _remoteRetention,
                _remoteBasePath);

            _ftpMakeDirectory = new FtpMakeDirectory(
                _remoteFtpServer,
                _remoteFtpUsr,
                _remoteFtpPwd,
                new Logger());

            _ftpSendFile = new FtpSendFile(
                _remoteFtpUsr,
                _remoteFtpPwd,
                new Logger());
        }
        public FtpSendFileToRemoteTest()
        {
            _remoteBasePath  = "MySQL";
            _backupPath      = @"C:\Data\Backup\MySQL\";
            _year            = "2018";
            _month           = "08";
            _remoteFtpServer = "ftp://192.168.0.185";
            _remoteFtpUsr    = "******";
            _remoteFtpPwd    = "carl";
            _file            = "20180818_my_test_db.zip";

            _ftpSendFile = new FtpSendFile(
                _remoteFtpUsr,
                _remoteFtpPwd,
                new Logger());
        }
예제 #3
0
 public PushLocalDummyFilesToRemoteFtp(IFtpMakeDirectory ftpMakeDirectory, IFtpSendFile ftpSendFile)
 {
     _ftpMakeDirectory = ftpMakeDirectory;
     _ftpSendFile      = ftpSendFile;
 }