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

            _ftpAccounts = new ObservableCollection <FtpAccount>();
            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());

            _ftpAccountAddCommand = new FtpAccountAddCommand(_interactionRequest, _accountsProvider, translationUpdater);
        }
        public void SetUp()
        {
            _interactionRequest = new UnitTestInteractionRequest();
            _translation        = new FtpActionTranslation();

            _ftpAccounts = new ObservableCollection <FtpAccount>();

            _profilesProvider = Substitute.For <ICurrentSettings <ObservableCollection <ConversionProfile> > >();

            _usedAccount           = new FtpAccount();
            _usedAccount.AccountId = nameof(_usedAccount);
            _usedAccount.UserName  = "******";
            _usedAccount.Server    = "SV1";
            _ftpAccounts.Add(_usedAccount);

            _unusedAccount           = new FtpAccount();
            _unusedAccount.AccountId = nameof(_unusedAccount);
            _unusedAccount.UserName  = "******";
            _unusedAccount.Server    = "SV2";
            _ftpAccounts.Add(_unusedAccount);

            _profiles = new ObservableCollection <ConversionProfile>();

            _profileWithFtpAccountEnabled               = new ConversionProfile();
            _profileWithFtpAccountEnabled.Name          = nameof(_profileWithFtpAccountEnabled);
            _profileWithFtpAccountEnabled.Ftp.Enabled   = true;
            _profileWithFtpAccountEnabled.Ftp.AccountId = _usedAccount.AccountId;
            _profiles.Add(_profileWithFtpAccountEnabled);

            _profileWithFtpAccountDisabled               = new ConversionProfile();
            _profileWithFtpAccountDisabled.Name          = nameof(_profileWithFtpAccountDisabled);
            _profileWithFtpAccountDisabled.Ftp.Enabled   = false;
            _profileWithFtpAccountDisabled.Ftp.AccountId = _usedAccount.AccountId;
            _profiles.Add(_profileWithFtpAccountDisabled);

            var settings = new PdfCreatorSettings();

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

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

            _ftpAccountRemoveCommand = new FtpAccountRemoveCommand(_interactionRequest, _accountsProvider, _profilesProvider, translationUpdater);
        }
        public void SetUp()
        {
            _interactionRequest         = new UnitTestInteractionRequest();
            _currentFtpAccount          = new FtpAccount();
            _currentFtpAccount.UserName = "******";
            _ftpAccounts = new ObservableCollection <FtpAccount>();
            _ftpAccounts.Add(_currentFtpAccount);
            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());

            _ftpAccountEditCommand = new FtpAccountEditCommand(_interactionRequest, currentSettingsProvider, translationUpdater);
        }