public void Setup() { var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); var tokenHelper = new TokenHelper(translationUpdater); var settingsProvider = Substitute.For <ICurrentSettingsProvider>(); settingsProvider.SelectedProfile.Returns(new ConversionProfile()); var settings = new PdfCreatorSettings(null); _dropboxAccounts = new ObservableCollection <DropboxAccount>(); settings.ApplicationSettings.Accounts.DropboxAccounts = _dropboxAccounts; settingsProvider.Settings.Returns(settings); var commandLocator = Substitute.For <ICommandLocator>(); commandLocator = Substitute.For <ICommandLocator>(); commandLocator.GetMacroCommand().Returns(x => new MacroCommand(commandLocator)); _addCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <DropboxAccountAddCommand>().Returns(_addCommand); _viewModel = new DropboxUserControlViewModel(tokenHelper, translationUpdater, settingsProvider, commandLocator); }
public void SetUp() { var tokenHelper = new TokenHelper(new DesignTimeTranslationUpdater()); var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); var settingsProvider = Substitute.For <ICurrentSettingsProvider>(); settingsProvider.SelectedProfile.Returns(new ConversionProfile()); var settings = new PdfCreatorSettings(null); _ftpAccounts = new ObservableCollection <FtpAccount>(); settings.ApplicationSettings.Accounts.FtpAccounts = _ftpAccounts; settingsProvider.Settings.Returns(settings); var commandLocator = Substitute.For <ICommandLocator>(); commandLocator.CreateMacroCommand().Returns(x => new MacroCommandBuilder(commandLocator)); _addCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <FtpAccountAddCommand>().Returns(_addCommand); _editCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <FtpAccountEditCommand>().Returns(_editCommand); _viewModel = new FtpActionViewModel(tokenHelper, translationUpdater, settingsProvider, commandLocator, new TokenViewModelFactory(settingsProvider, new TokenHelper(new DesignTimeTranslationUpdater())), null); }
public void SetUp() { _interactionRequest = new UnitTestInteractionRequest(); var fileWrap = Substitute.For <IFile>(); var openFileInteractionHelper = Substitute.For <IOpenFileInteractionHelper>(); var editionHintOptionProvider = new EditionHintOptionProvider(false, false); var translationUpdater = new TranslationUpdater(new TranslationFactory(null), new ThreadManager()); var settingsProvider = Substitute.For <ICurrentSettingsProvider>(); var settings = new PdfCreatorSettings(null); _timeServerAccounts = new ObservableCollection <TimeServerAccount>(); settings.ApplicationSettings.Accounts.TimeServerAccounts = _timeServerAccounts; settingsProvider.Settings.Returns(settings); var commandLocator = Substitute.For <ICommandLocator>(); commandLocator = Substitute.For <ICommandLocator>(); commandLocator.GetMacroCommand().Returns(x => new MacroCommand(commandLocator)); _timeServerAddCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <TimeServerAccountAddCommand>().Returns(_timeServerAddCommand); _timeServerEditCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <TimeServerAccountEditCommand>().Returns(_timeServerEditCommand); _viewModel = new SignUserControlViewModel(_interactionRequest, fileWrap, openFileInteractionHelper, editionHintOptionProvider, translationUpdater, settingsProvider, settingsProvider, commandLocator); }
public void Setup() { _processStarter = Substitute.For <IProcessStarter>(); _pdfArchitectCheck = Substitute.For <IPdfArchitectCheck>(); _file = Substitute.For <IFile>(); _translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); }
public void SetUp() { var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); var settingsProvider = Substitute.For <ICurrentSettingsProvider>(); settingsProvider.SelectedProfile.Returns(new ConversionProfile()); var settings = new PdfCreatorSettings(); _httpAccounts = new ObservableCollection <HttpAccount>(); settings.ApplicationSettings.Accounts.HttpAccounts = _httpAccounts; _accountsProvider = Substitute.For <ICurrentSettings <Accounts> >(); _accountsProvider.Settings.Returns(settings.ApplicationSettings.Accounts); var commandLocator = Substitute.For <ICommandLocator>(); commandLocator.CreateMacroCommand().Returns(x => new MacroCommandBuilder(commandLocator)); _addCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <HttpAccountAddCommand>().Returns(_addCommand); _editCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <HttpAccountEditCommand>().Returns(_editCommand); _viewModel = new HttpActionViewModel(translationUpdater, _accountsProvider, settingsProvider, commandLocator, null, new GpoSettingsDefaults()); }
public void SetUp() { _interactionRequest = new UnitTestInteractionRequest(); _smtpTest = Substitute.For <ISmtpTest>(); var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _profile = new ConversionProfile(); var currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>(); currentSettingsProvider.SelectedProfile.Returns(_profile); var settings = new PdfCreatorSettings(null); _smtpAccounts = new ObservableCollection <SmtpAccount>(); settings.ApplicationSettings.Accounts.SmtpAccounts = _smtpAccounts; currentSettingsProvider.Settings.Returns(settings); var commandLocator = Substitute.For <ICommandLocator>(); commandLocator = Substitute.For <ICommandLocator>(); commandLocator.GetMacroCommand().Returns(x => new MacroCommand(commandLocator)); _addCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <SmtpAccountAddCommand>().Returns(_addCommand); _editCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <SmtpAccountEditCommand>().Returns(_editCommand); _tokenHelper = new TokenHelper(new DesignTimeTranslationUpdater()); _tokenReplacer = _tokenHelper.TokenReplacerWithPlaceHolders; _viewModel = new SmtpActionViewModel(_interactionRequest, _smtpTest, translationUpdater, currentSettingsProvider, commandLocator, _tokenHelper); }
public void SetUp() { var translationUpdater = new TranslationUpdater(new TranslationFactory(null), new ThreadManager()); _commandLocator = Substitute.For <ICommandLocator>(); _frequentTipsControlViewModel = new FrequentTipsControlViewModel(translationUpdater, _commandLocator); }
private MetadataViewModel BuildViewModel() { _currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>(); _currentSettingsProvider.SelectedProfile.Returns(_profile); var translationUpdater = new TranslationUpdater(_translationFactory, Substitute.For <IThreadManager>()); return(new MetadataViewModel(translationUpdater, _currentSettingsProvider, new TokenHelper(new DesignTimeTranslationUpdater()))); }
public void Setup() { _translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _languageProvider = Substitute.For <ILanguageProvider>(); _gpoSettings = Substitute.For <IGpoSettings>(); _currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>(); _translationHelper = Substitute.For <ITranslationHelper>(); _currentSettingsProvider.Settings.Returns(new PdfCreatorSettings(new IniStorage())); }
public void Initialize_UpdateOrCreateTranslationViaTranslationFactoryOfTranslationUpdater() { var translation = new TranslatableCommandBaseTestTranslation(); _translationFactory = Substitute.For <ITranslationFactory>(); _translationFactory.UpdateOrCreateTranslation(Arg.Any <TranslatableCommandBaseTestTranslation>()).Returns(translation); var translationUpdater = new TranslationUpdater(_translationFactory, new ThreadManager()); _translatableCommandBase = new TranslatableCommandBaseTestClass(translationUpdater); Assert.AreSame(translation, _translatableCommandBase.GetTranslation()); }
public void Setup() { _translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _processStarter = Substitute.For <IProcessStarter>(); _gpoSettings = Substitute.For <IGpoSettings>(); _currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>(); _currentSettingsProvider.Settings.Returns(new PdfCreatorSettings(new IniStorage())); _updateAssistant = Substitute.For <IUpdateAssistant>(); _interactionRequest = Substitute.For <IInteractionRequest>(); _eventAggregator = new EventAggregator(); }
public void Setup() { var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _translation = new DropboxTranslation(); _dropboxService = Substitute.For <IDropboxService>(); _dropboxService.ParseAccessToken(Arg.Any <Uri>()).Returns("AccessAccount"); _dropboxAppData = new DropboxAppData("DummieAppKeyForTest", _redirectUri); _viewModel = new DropboxAccountViewModel(_dropboxService, _dropboxAppData, translationUpdater); _accountInteraction = new DropboxAccountInteraction(); _viewModel.SetInteraction(_accountInteraction); }
public void Setup() { var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); var commandLocator = Substitute.For <ICommandLocator>(); _urlOpenCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <UrlOpenCommand>().Returns(_urlOpenCommand); _copyToClipboardCommand = Substitute.For <ICommand>(); commandLocator.GetCommand <CopyToClipboardCommand>().Returns(_copyToClipboardCommand); _viewModel = new DropboxShareLinkStepViewModel(translationUpdater, commandLocator); }
public void Setup() { _translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _commandLocator = Substitute.For <ICommandLocator>(); _settingsProvider = Substitute.For <ICurrentSettingsProvider>(); _settings = new PdfCreatorSettings(null); _settingsProvider.Settings.Returns(_settings); _applicationSettings = new ApplicationSettings(); _settings.ApplicationSettings = _applicationSettings; _titleReplacements = new ObservableCollection <TitleReplacement>(); _applicationSettings.TitleReplacement = _titleReplacements; }
private void InitViewModel() { var settings = new PdfCreatorSettings(null); settings.ApplicationSettings.Accounts = _accounts; var settingsProvider = Substitute.For <ICurrentSettingsProvider>(); settingsProvider.Settings.Returns(settings); var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _viewModel = new AccountsViewModel(settingsProvider, _commandLocator, translationUpdater, new InvokeImmediatelyDispatcher(), null); }
public void Setup() { _replacementEditInteraction = new TitleReplacementEditInteraction(new TitleReplacement()); _replacementEditInteraction.Replacement.Search = "SearchTest"; _replacementEditInteraction.Replacement.Replace = "ReplacementTest"; _replacementEditInteraction.Replacement.ReplacementType = ReplacementType.Replace; _finishedCalled = false; _translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _commandLocator = Substitute.For <ICommandLocator>(); _mockShowUserGuideCommand = Substitute.For <ICommand>(); _commandLocator.GetInitializedCommand <ShowUserGuideCommand, HelpTopic>(HelpTopic.AppTitle).Returns(info => _mockShowUserGuideCommand); }
public void SetUp() { var translationUpdater = new TranslationUpdater(new TranslationFactory(null), new ThreadManager()); _ftpAccount = new FtpAccount(); _ftpAccount.AccountId = "ID"; _ftpAccount.UserName = "******"; _ftpAccount.Server = "Server"; _ftpAccount.Password = "******"; _ftpAccountInteraction = new FtpAccountInteraction(_ftpAccount, "FtpAccountTestTitle"); _viewModel = new FtpAccountViewModel(translationUpdater); }
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() { _translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _processStarter = Substitute.For <IProcessStarter>(); _gpoSettings = Substitute.For <IGpoSettings>(); _currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>(); _currentSettings = Substitute.For <ICurrentSettings <UpdateInterval> >(); _updateAssistant = Substitute.For <IUpdateAssistant>(); _updateLauncher = Substitute.For <IUpdateLauncher>(); _interactionRequest = Substitute.For <IInteractionRequest>(); _eventAggregator = new EventAggregator(); }
public void SetUp() { _interactionRequest = new UnitTestInteractionRequest(); _translation = new DropboxTranslation(); _dropboxAccounts = new ObservableCollection <DropboxAccount>(); _usedAccount = new DropboxAccount(); _usedAccount.AccountId = nameof(_usedAccount); _usedAccount.AccountInfo = "AI1"; _usedAccount.AccessToken = "AT1"; _dropboxAccounts.Add(_usedAccount); _unusedAccount = new DropboxAccount(); _unusedAccount.AccountId = nameof(_unusedAccount); _unusedAccount.AccountInfo = "AI2"; _unusedAccount.AccessToken = "AT2"; _dropboxAccounts.Add(_unusedAccount); _profilesProvider = Substitute.For <ICurrentSettings <ObservableCollection <ConversionProfile> > >(); _profiles = new ObservableCollection <ConversionProfile>(); _profileWithDropboxActionEnabled = new ConversionProfile(); _profileWithDropboxActionEnabled.Name = nameof(_profileWithDropboxActionEnabled); _profileWithDropboxActionEnabled.DropboxSettings.Enabled = true; _profileWithDropboxActionEnabled.DropboxSettings.AccountId = _usedAccount.AccountId; _profiles.Add(_profileWithDropboxActionEnabled); _profileWithDropboxActionDisabled = new ConversionProfile(); _profileWithDropboxActionDisabled.Name = nameof(_profileWithDropboxActionDisabled); _profileWithDropboxActionDisabled.DropboxSettings.Enabled = false; _profileWithDropboxActionDisabled.DropboxSettings.AccountId = _usedAccount.AccountId; _profiles.Add(_profileWithDropboxActionDisabled); var settings = new PdfCreatorSettings(); settings.ApplicationSettings.Accounts.DropboxAccounts = _dropboxAccounts; 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()); _dropboxService = Substitute.For <IDropboxService>(); _dropboxAccountRemoveCommand = new DropboxAccountRemoveCommand(_interactionRequest, _accountsProvider, _profilesProvider, _dropboxService, 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(); _translation = new HttpTranslation(); _httpAccounts = new ObservableCollection <HttpAccount>(); _usedAccount = new HttpAccount(); _usedAccount.AccountId = nameof(_usedAccount); _usedAccount.Url = "www.pdfforge1.org"; _usedAccount.UserName = "******"; _httpAccounts.Add(_usedAccount); _unusedAccount = new HttpAccount(); _unusedAccount.AccountId = nameof(_unusedAccount); _unusedAccount.Url = "www.pdfforge2.org"; _unusedAccount.UserName = "******"; _httpAccounts.Add(_unusedAccount); _profiles = new ObservableCollection <ConversionProfile>(); _profileWithHttpAccountEnabled = new ConversionProfile(); _profileWithHttpAccountEnabled.Name = nameof(_profileWithHttpAccountEnabled); _profileWithHttpAccountEnabled.HttpSettings.Enabled = true; _profileWithHttpAccountEnabled.HttpSettings.AccountId = _usedAccount.AccountId; _profiles.Add(_profileWithHttpAccountEnabled); _profileWithHttpAccountDisabled = new ConversionProfile(); _profileWithHttpAccountDisabled.Name = nameof(_profileWithHttpAccountDisabled); _profileWithHttpAccountDisabled.HttpSettings.Enabled = false; _profileWithHttpAccountDisabled.HttpSettings.AccountId = _usedAccount.AccountId; _profiles.Add(_profileWithHttpAccountDisabled); var settings = new PdfCreatorSettings(null); settings.ApplicationSettings.Accounts.HttpAccounts = _httpAccounts; settings.ConversionProfiles = _profiles; var currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>(); currentSettingsProvider.Settings.Returns(settings); currentSettingsProvider.Profiles.Returns(_profiles); var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _httpAccountRemoveCommand = new HttpAccountRemoveCommand(_interactionRequest, currentSettingsProvider, translationUpdater); }
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); }
public void SetUp() { var translationUpdater = new TranslationUpdater(new TranslationFactory(null), new ThreadManager()); _timeServerAccount = new TimeServerAccount { AccountId = new Guid().ToString(), Url = "www.randometimeserver.org", UserName = "******", Password = "******", IsSecured = true }; _timeServerAccountInteraction = new TimeServerAccountInteraction(_timeServerAccount, "TimeServerAccountTestTitle"); _viewModel = new TimeServerAccountViewModel(translationUpdater); }
public void SetUp() { _interactionRequest = new UnitTestInteractionRequest(); _mailClientTest = Substitute.For <IClientTestEmail>(); var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _profile = new ConversionProfile(); var currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>(); currentSettingsProvider.SelectedProfile.Returns(_profile); _tokenHelper = new TokenHelper(new DesignTimeTranslationUpdater()); _tokenReplacer = _tokenHelper.TokenReplacerWithPlaceHolders; _viewModel = new MailClientControlViewModel(_interactionRequest, _mailClientTest, translationUpdater, currentSettingsProvider, new TokenViewModelFactory(currentSettingsProvider, new TokenHelper(new DesignTimeTranslationUpdater())), null); }
public void SetUp() { var translationUpdater = new TranslationUpdater(new TranslationFactory(null), new ThreadManager()); _httpAccount = new HttpAccount { AccountId = new Guid().ToString(), Url = "www.pdfforge.org", UserName = "******", Password = "******", IsBasicAuthentication = true }; _httpAccountInteraction = new HttpAccountInteraction(_httpAccount, "HttpAccountTestTitle"); _viewModel = new HttpAccountViewModel(translationUpdater); _viewModel.SetPasswordAction = s => { }; }
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); }
public void SetUp() { var translationUpdater = new TranslationUpdater(new TranslationFactory(null), new ThreadManager()); _smtpAccount = new SmtpAccount { AccountId = "ID", Address = "Address", UserName = "******", Server = "Server", Password = "******", Port = 0, Ssl = true }; _smtpAccountInteraction = new SmtpAccountInteraction(_smtpAccount, "SmtpAccountTestTitle"); _viewModel = new SmtpAccountViewModel(translationUpdater); }
public void SetUp() { _process = Substitute.For <IProcessStarter>(); var product = Product.PdfCreator; _offlineActivator = Substitute.For <IOfflineActivator>(); var activation = new Activation(acceptExpiredActivation: true) { Product = product }; _translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _viewModel = new OfflineActivationUserControlViewModel(_process, _offlineActivator, _translationUpdater); _viewModel.FinishInteraction = () => { _finishInteractionWasCalled = true; }; _propertiesChangedList = new List <string>(); _interaction = new OfflineActivationInteraction(ValidLicenseKey); _viewModel.SetInteraction(_interaction); }
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); }