public async Task Index_ReturnsAViewResult_WithAListOfManagers() { //Arrange var dbContext = await GetDatabaseContext(); var managersController = new ManagersController(dbContext); //Act var result = await managersController.Index("", "", "", null); // Assert var viewResult = Assert.IsType <ViewResult>(result); var model = Assert.IsAssignableFrom <IEnumerable <Manager> >( viewResult.ViewData.Model); Assert.Equal(2, model.Count()); }