public ActionResult Index()
 {
     ViewBag.Title = "Transaction Page";
       TransactionsController tc = new TransactionsController(db);
       var result = tc.GetAllTransactions() as OkNegotiatedContentResult<List<Transaction>>;
       return View(result.Content);
 }
        public void GetAllTransactions_ShouldReturnAllTransactions()
        {
            var context = new TestTransactionContext();
              context.Transactions.Add(new Transaction { TransactionId = 1, Description = "Demo1", TransactionAmount = 1.23M });
              context.Transactions.Add(new Transaction { TransactionId = 2, Description = "Demo2", TransactionAmount = 2.34M });
              context.Transactions.Add(new Transaction { TransactionId = 3, Description = "Demo3", TransactionAmount = 34.45M });
              context.Transactions.Add(new Transaction { TransactionId = 4, Description = "Demo4", TransactionAmount = 456.78M });
              var controller = new TransactionsController(context);

              var result = controller.GetAllTransactions() as OkNegotiatedContentResult<List<Transaction>>;
              Assert.AreEqual(4, result.Content.Count);
        }