public void Index_returns_list_of_correct_Trips() { TripController controller = new TripController(repository, provider); ViewResult result = controller.Index() as ViewResult; Assert.IsNotNull(result); EnumerableQuery <Trip> model = (EnumerableQuery <Trip>)result.ViewData.Model; Assert.IsNotNull(model); Assert.AreEqual(1, model.Count()); Assert.IsTrue(model.Contains(userTrip)); }