public MainWindowViewModel( IAccountsSearchViewModel accountsSearchViewModel, IAccountsSearchHistoryViewModel accountsSearchHistoryViewModel, IAccountInfoViewModel accountInfoViewModel ) { AccountsSearchViewModel = accountsSearchViewModel; AccountsSearchHistoryViewModel = accountsSearchHistoryViewModel; AccountInfoViewModel = accountInfoViewModel; }
public AccountsSearchViewModelTests() { _wargamingServiceMock = new Mock <IWargamingService>(); _applicationMessageDicpatcherMock = new Mock <IApplicationMessagesDispatcher>(); _accountsSearchViewModel = new AccountsSearchViewModel( _wargamingServiceMock.Object, _applicationMessageDicpatcherMock.Object); _wargamingServiceMock.Setup(s => s.FindAccounts(It.IsAny <string>())) .ReturnsAsync(new List <WotBlitzStatician.Model.AccountInfo> { new WotBlitzStatician.Model.AccountInfo { AccountId = 1, NickName = "First" }, new WotBlitzStatician.Model.AccountInfo { AccountId = 2, NickName = "Second" } }); }