public void GetAllHumanNames_OrderIsImportant() { var names = AccountTypeHelper.GetAllHumanNames(); names.Count.Should().Be(3); names[0].Should().BeEquivalentTo("Наличные"); names[1].Should().BeEquivalentTo("Дебетовая карта"); names[2].Should().BeEquivalentTo("Кредитная карта"); }
public void GetAllHumanNames_ReturnsHumanNames() { AccountTypeHelper.GetAllHumanNames().Should().BeEquivalentTo(new[] { "Наличные", "Дебетовая карта", "Кредитная карта" }); }
public async Task OnGetAsync() { Account = new EditAccount { Id = -1, Number = await _accountQueries.GetNextNumber(), CreationDate = _timeService.ClientLocalNow.ToStandardString(false) }; AccountTypes = AccountTypeHelper.GetAllHumanNames(); }
public async Task <IActionResult> OnPostAsync() { return(await Account.ProcessAsync(ModelState, nameof(Account), async() => { var model = new AccountModel { Id = -1 }; Account.ToAccountModel(model); await _accountCommands.Update(model); return RedirectToPage("./AccountsList"); }, async() => { AccountTypes = AccountTypeHelper.GetAllHumanNames(); return await Task.FromResult(Page()); })); }
private async Task PrepareModelsAsync(int accountId) { AccountTypes = AccountTypeHelper.GetAllHumanNames(); Transactions = await _transactionQueries.GetLastTransactions(accountId, 3); }