public async Task ShouldGetCrews() { // Create 2 crews await CreateCrew(_crewName2); await CreateCrew(_crewName3); // Check that the list contains both CrewService crewService = new CrewService(_dbContext, _mainEventProvider); CrewController crewController = new CrewController(crewService); ActionResult <List <CrewListVm> > result = await crewController.GetCrewsAsync(); List <CrewListVm> returnedCrews = (List <CrewListVm>)((OkObjectResult)result.Result).Value; // There was already 1 crew from BaseTest + we have created 2 crews Assert.AreEqual(3, returnedCrews.Count); Assert.AreEqual(2, returnedCrews[1].Id); Assert.AreEqual(_crewName2, returnedCrews[1].Name); Assert.AreEqual(3, returnedCrews[2].Id); Assert.AreEqual(_crewName3, returnedCrews[2].Name); }