public async Task GetSearchEntries_NotExistingAnime_ShouldReturnEmptyCollection() { // Given var api = new AnimeApi(requester); var query = new SearchAnimeQuery { Title = "qwertyuiopasdghjkl" }; // When var apiResult = await api.GetSearchEntriesAsync(query); // Then apiResult.Results.Should().BeEmpty(); }
public async Task GetSearchEntries_ExistingAnime_ShouldReturnSearchEntries() { // Given const int cowboyBebopId = 1; var api = new AnimeApi(requester); var query = new SearchAnimeQuery { Title = "Cowboy Bebop" }; // When var apiResult = await api.GetSearchEntriesAsync(query); // Then using var scope = new AssertionScope(); var firstResult = apiResult.Results.First(); apiResult.Results.Count.Should().Be(4); firstResult.Title.Should().Be("Cowboy Bebop"); firstResult.ImageUrl.Should().NotBeNullOrWhiteSpace(); firstResult.MalId.Should().Be(cowboyBebopId); }