public void List_Entries_Test() { // Arrange Mock<ILedgerEntries> MockEntries = SetMockEntries(); // Act HomeController Controller = new HomeController(MockEntries.Object); ViewResult Result = Controller.List(); IEnumerable<LedgerEntry> model = (IEnumerable<LedgerEntry>)Result.Model; // Assert Assert.AreEqual("First entry", model.ElementAt(0).Description); Assert.AreEqual("Second entry", model.ElementAt(1).Description); Assert.AreEqual("Third entry", model.ElementAt(2).Description); }
public void ListTest() { ILedgerEntries budgetEntries = null; // TODO: Initialize to an appropriate value HomeController target = new HomeController(budgetEntries); // TODO: Initialize to an appropriate value int page = 0; // TODO: Initialize to an appropriate value ViewResult expected = null; // TODO: Initialize to an appropriate value ViewResult actual; actual = target.List(page); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }