public async Task <IActionResult> Transactions() { var user = _userManager.GetCurrentUser(HttpContext); var txs = await _accountService.GetTransactionsAsync(user.GenesisId, TxVerbosity.PubKeySign); var model = new ManageTransactionsViewModel { Transactions = txs.ToList() }; return(View(model)); }
public void Should_Have_Days_With_Statements_On_Init() { var manager = new AccountManager() { Accounts = { new Account("TestAccount") } }; manager.AddTransaction(new Income(1000, new Account("TestAccount")), new DateTime(2000, 1, 1)); ViewModel = new ManageTransactionsViewModel(manager); Assert.AreEqual(1, ViewModel.AccountManager.Calendar.Days.Count()); Assert.AreEqual(1, ViewModel.Days.Count()); }
public void Should_Have_No_Stateless_Days_On_Init() { var manager = new AccountManager() { Accounts = { new Account("TestAccount") } }; manager.Calendar.GetDayForDate(new DateTime(2000, 1, 1)); ViewModel = new ManageTransactionsViewModel(manager); Assert.AreEqual(1, ViewModel.AccountManager.Calendar.Days.Count()); Assert.AreEqual(0, ViewModel.Days.Count()); }