public async Task GetImages_TotalCountIsPresentInHeaders(int categoryId, int limit) { var response = await _catApiRepository.GetImagesAsync(_apiKey, categoryId, limit, 0); int.TryParse(WebMappingProfile.GetTotalCountFromHeaders(response).ToString(), out int totalCount); Assert.GreaterOrEqual(totalCount, response.Data.Count); }
public async Task <PagedModel <Image> > GetImagesAsync(int categoryId, int limit, int page) { string apiKey = _configuration[Configurations.ApiKey]; var response = await _catApiRepository.GetImagesAsync(apiKey, categoryId, limit, page); var result = _mapper.Map <PagedModel <Image> >(response); return(result); }