public async Task ShouldBeAbleToGetAllCandidates() { var dbCandidates = await Arranger.CreateCandidates(); var responseCandidateDtos = await ApiClient.GetAllCandidates() .AwaitGetSuccessfulResponse <IEnumerable <CandidateDto> >(); var responseCandidates = Mapper.Map <IEnumerable <Candidate> >(responseCandidateDtos); responseCandidates = Enumerable.Where <Candidate>(responseCandidates, rc => dbCandidates.Any(dc => dc.Id == rc.Id)); Assert.IsTrue(LikenessCompareExtensions.CompareCollectionsUsingLikeness <Candidate, Candidate>(responseCandidates, dbCandidates)); }
public async Task ShouldBeAbleToGetAllQuestions() { var dbQuestions = await Arranger.CreateQuestions(); var responseQuestionDtos = await ApiClient.GetAllQuestions() .AwaitGetSuccessfulResponse <IEnumerable <QuestionDto> >(); var responseQuestions = Mapper.Map <IEnumerable <Question> >(responseQuestionDtos); responseQuestions = Enumerable.Where <Question>(responseQuestions, rq => dbQuestions.Any(dq => dq.Id == rq.Id)); Assert.IsTrue(LikenessCompareExtensions.CompareCollectionsUsingLikeness <Question, Question>(responseQuestions, dbQuestions)); }