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 GetImages_CheckLimit(int categoryId, int limit) { var response = await _catApiRepository.GetImagesAsync(_apiKey, categoryId, limit, 0); int.TryParse(WebMappingProfile.GetTotalCountFromHeaders(response).ToString(), out int totalCount); if (totalCount > limit) { Assert.AreEqual(limit, response.Data.Count); } else { Assert.AreEqual(totalCount, response.Data.Count); } }