public async Task ShouldCheckIfAUserIsAMemberOfACrew() { CrewService crewService = new CrewService(_dbContext, _mainEventProvider); CrewController crewController = new CrewController(crewService); SetUser(crewController, _createdUser1.Entity.Id); ActionResult <List <CrewListVm> > result = await crewController.GetCrewsUserIsMemberOfAsync(); List <CrewListVm> returnedCrewLeaders = (List <CrewListVm>)((OkObjectResult)result.Result).Value; Assert.AreEqual(1, returnedCrewLeaders.Count); Assert.AreEqual(1, returnedCrewLeaders[0].Id); }