public void GetResultsCheckResults(int teamId, int element) { List <ResultDto> resultDtoCollection = new List <ResultDto>(); List <ResultDto> dtoTest = this.resultsDtoCollection.ElementAt(element); ResultDtoComparer dtoComparer = new ResultDtoComparer(); int skip = 0; int take = 10; resultDtoCollection = this.teamDetailsService.GetResults(teamId, skip, take).ToList(); CollectionAssert.AreEqual(resultDtoCollection, dtoTest, dtoComparer); }
public void CheckResultToResultDtoMapping() { ResultDtoComparer dtoComparer = new ResultDtoComparer(); List <ResultDto> resultsDto = this.resultsDto; List <ResultDto> mappedDto = new List <ResultDto>(); List <Result> testResults = this.testResults; foreach (Result result in testResults) { mappedDto.Add(Mapper.Map <Result, ResultDto>(result)); } CollectionAssert.AreEqual(resultsDto, mappedDto, dtoComparer); }