public void GetAllTransactions_Test() { //arrange //act //assert Assert.IsType <List <ManualTransactionLog> >(ManualTransactionLog.GetAllTransactions()); }
/// <summary> /// Action returns a list of Manual Transactions /// </summary> /// <returns></returns> public ActionResult ViewAllManualPayments() { try { List <ManualTransactionViewModel> model = new List <ManualTransactionViewModel>(); foreach (var item in ManualTransactionLog.GetAllTransactions()) { model.Add(new ManualTransactionViewModel { Amount = item.Amount, DriverName = item.Driver.FullName.FirstName + " " + item.Driver.FullName.LastName, Time = UISupportiveFunctions.GetPassedTimeSpanFromNow(item.TransactionDateTime) }); } return(View(model)); } catch (Exception ex) { return(RedirectToAction("ErrorPage", "Error", ex)); } }