public async Task GetPopularAsync_CanPageResults() { const int minimumPageCount = 2; const int minimumTotalResultsCount = 40; await ApiResponseUtil.AssertCanPageSearchResponse("unused", minimumPageCount, minimumTotalResultsCount, (str, page) => _api.GetPopularAsync(page), x => x.Id); }
public async Task GetTopRatedAsync_CanPageResults() { const int minimumPageCount = 5; const int minimumTotalResultsCount = 100; await ApiResponseUtil.AssertCanPageSearchResponse("none", minimumPageCount, minimumTotalResultsCount, (str, page) => _api.GetTopRatedAsync(page), x => x.Id); }
public async Task SearchByNameAsync_CanPageResults() { const string query = "Cox"; const int minimumPageCount = 15; const int minimumTotalResultsCount = 300; await ApiResponseUtil.AssertCanPageSearchResponse(query, minimumPageCount, minimumTotalResultsCount, (search, pageNumber) => _api.SearchByNameAsync(search, pageNumber), null); }
public async Task GetMoviesAsync_CanPageResults() { const int companyId = 3; const int minimumPageCount = 4; const int minimumTotalResultsCount = 75; await ApiResponseUtil.AssertCanPageSearchResponse(companyId, minimumPageCount, minimumTotalResultsCount, (id, pageNumber) => _api.GetMoviesAsync(id, pageNumber), x => x.Id); }
public async Task GetNowPlayingAsync_CanPageResults() { // Now Playing typically has 25+ pages. const int minimumPageCount = 5; const int minimumTotalResultsCount = 100; // 20 results per page x 5 pages = 100 await ApiResponseUtil.AssertCanPageSearchResponse("unused", minimumPageCount, minimumTotalResultsCount, (str, page) => _api.GetNowPlayingAsync(page), x => x.Id); }
public async Task SearchByTitleAsync_CanPageResults() { const string query = "Harry"; const int minimumPageCount = 8; const int minimumTotalResultsCount = 140; await ApiResponseUtil.AssertCanPageSearchResponse(query, minimumPageCount, minimumTotalResultsCount, (search, pageNumber) => _api.SearchByTitleAsync(search, pageNumber), x => x.Id); }
public async Task GetUpcomingAsync_CanPageResults() { // Now Playing typically has 5+ pages. // - intentionally setting minimumTotalResultsCount at 50; sometimes upcoming movies are scarce. const int minimumPageCount = 3; const int minimumTotalResultsCount = 50; // 20 results per page x 3 pages = 60 await ApiResponseUtil.AssertCanPageSearchResponse("unused", minimumPageCount, minimumTotalResultsCount, (str, page) => _api.GetUpcomingAsync(page), x => x.Id); }
public async Task FindMoviesByIdAsync_CanPageResults() { int genreId = GenreFactory.Comedy().Id; // Comedy has upwards of 2k pages. const int minimumPageCount = 5; const int minimumTotalResultsCount = 100; // 20 results per page x 5 pages = 100 await ApiResponseUtil.AssertCanPageSearchResponse(genreId, minimumPageCount, minimumTotalResultsCount, (id, page) => _api.FindMoviesByIdAsync(id, page), x => x.Id); }