public void SetUp()
        {
            _interactionRequest = new UnitTestInteractionRequest();

            _httpAccounts = new ObservableCollection <HttpAccount>();
            var settings = new PdfCreatorSettings();

            settings.ApplicationSettings.Accounts.HttpAccounts = _httpAccounts;
            _accountsProvider = Substitute.For <ICurrentSettings <Accounts> >();
            _accountsProvider.Settings.Returns(settings.ApplicationSettings.Accounts);

            var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager());

            _httpAccountAddCommand = new HttpAccountAddCommand(_interactionRequest, _accountsProvider, translationUpdater);
        }
        public void SetUp()
        {
            _file = Substitute.For <IFile>();
            _file.Exists(Arg.Any <string>()).Returns(true);

            _unitTestInteractionRequest = new UnitTestInteractionRequest();
            var translationUpdater = new DesignTimeTranslationUpdater();

            _deleteHistoricFilesCommand = new DeleteHistoricFilesCommand(_file, _unitTestInteractionRequest, translationUpdater);

            _translation = new DeleteFilesTranslation();

            _historicFiles = new List <HistoricFile> {
                new HistoricFile(File1, "", "", ""), new HistoricFile(File2, "", "", "")
            };
        }
        public void SetUp()
        {
            _interactionRequest = new UnitTestInteractionRequest();

            _ftpAccounts = new ObservableCollection <FtpAccount>();
            var settings = new PdfCreatorSettings(null);

            settings.ApplicationSettings.Accounts.FtpAccounts = _ftpAccounts;
            var currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>();

            currentSettingsProvider.Settings.Returns(settings);

            _translation = new FtpActionTranslation();
            var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager());

            _ftpAccountAddCommand = new FtpAccountAddCommand(_interactionRequest, currentSettingsProvider, translationUpdater);
        }
Beispiel #4
0
        public void SetUp()
        {
            _interactionRequest         = new UnitTestInteractionRequest();
            _currentFtpAccount          = new FtpAccount();
            _currentFtpAccount.UserName = "******";
            _ftpAccounts = new ObservableCollection <FtpAccount>();
            _ftpAccounts.Add(_currentFtpAccount);
            var settings = new PdfCreatorSettings();

            settings.ApplicationSettings.Accounts.FtpAccounts = _ftpAccounts;
            _accountsProvider = Substitute.For <ICurrentSettings <Accounts> >();
            _accountsProvider.Settings.Returns(settings.ApplicationSettings.Accounts);

            _translation = new FtpActionTranslation();
            var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager());

            _ftpAccountEditCommand = new FtpAccountEditCommand(_interactionRequest, _accountsProvider, translationUpdater);
        }
Beispiel #5
0
        public void SetUp()
        {
            _interactionRequest = new UnitTestInteractionRequest();
            _translation        = new HttpTranslation();
            _currentHttpAccount = new HttpAccount()
            {
                UserName = "******"
            };
            _httpAccounts = new ObservableCollection <HttpAccount>();
            _httpAccounts.Add(_currentHttpAccount);
            var settings = new PdfCreatorSettings(null);

            settings.ApplicationSettings.Accounts.HttpAccounts = _httpAccounts;
            var currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>();

            currentSettingsProvider.Settings.Returns(settings);

            var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager());

            _httpAccountEditCommand = new HttpAccountEditCommand(_interactionRequest, currentSettingsProvider, translationUpdater);
        }