public async void QueryAllTeamMembersList_ReturnsCorrectMembers() { // 1A MembersController controller = new MembersController(_memoryRepositoryHelper .RepoWith5Teams(), _mapper, _logger); Guid teamId = new Guid(FakeMemoryRepositoryHelper.TEAM_1_ID); // 2A var result = await controller.GetAllMembers(teamId); // 3A var okResult = Assert.IsType <OkObjectResult>(result); var returnValue = Assert.IsType <List <MemberForList> >(okResult.Value); Assert.Equal(2, returnValue.Count()); }
public async void QueryTeamList_ReturnsCorrectTeams() { // 1A TeamsController controller = new TeamsController(_memoryRepositoryHelper .RepoWith5Teams(), _mapper, _logger); // 2A var result = await controller.GetAllTeams(); // 3A var okResult = Assert.IsType <OkObjectResult>(result); var returnValue = Assert.IsType <List <TeamForList> >(okResult.Value); Assert.Equal(5, returnValue.Count()); }