// ReSharper disable once InconsistentNaming public async Task GetFullShowsByTheTvDbIdsAsync_should_return_full_shows_by_ids() { using (var context = CreateContext()) { await SeedGenresAsync(context); var repo = new ShowsRepository(context); int[] ids = { 1002, 1003, 1004 }; var shows = await repo.GetFullShowsByTheTvDbIdsAsync(ids); Assert.Equal(ids.Length, shows.Length); for (int i = 0; i < ids.Length; i++) { Assert.Equal(ids[i], shows[i].TheTvDbId); AssertIsFull(shows[i]); } } }
// ReSharper disable once InconsistentNaming public async Task GetFullShowsByTheTvDbIdsAsync_should_return_null_if_ids_array_is_empty() { using (var context = CreateContext()) { await SeedGenresAsync(context); var repo = new ShowsRepository(context); var shows = await repo.GetFullShowsByTheTvDbIdsAsync(Array.Empty<int>()); Assert.Equal(0, shows.Length); } }
// ReSharper disable once InconsistentNaming public async Task GetFullShowsByTheTvDbIdsAsync_should_return_null_if_no_id_matches() { using (var context = CreateContext()) { await SeedGenresAsync(context); var repo = new ShowsRepository(context); int[] ids = { 999999999 }; var shows = await repo.GetFullShowsByTheTvDbIdsAsync(ids); Assert.Equal(0, shows.Length); } }