示例#1
0
        public async Task SearchAnime_NonEmptyQuery_ShouldReturnNotNullSearchAnime(string query)
        {
            // When
            AnimeSearchResult returnedAnime = await _jikan.SearchAnime(query);

            // Then
            returnedAnime.Should().NotBeNull();
        }
示例#2
0
        public async Task SearchAnime_TVConfig_ShouldReturnNotNullSearchAnime(string query)
        {
            // Given
            var searchConfig = new AnimeSearchConfig
            {
                Type = AnimeType.TV
            };

            // When
            AnimeSearchResult returnedAnime = await _jikan.SearchAnime(query, searchConfig);

            // Then
            returnedAnime.Should().Be(returnedAnime);
        }
示例#3
0
        public async Task SearchAnime_OneQueryActionCompletedAnimeSecondPage_ShouldReturnNotEmptyCollection()
        {
            // Given
            var searchConfig = new AnimeSearchConfig
            {
                Status = AiringStatus.Completed,
                Genres = new List <GenreSearch> {
                    GenreSearch.Action
                }
            };

            // When
            AnimeSearchResult returnedAnime = await _jikan.SearchAnime("one", 2, searchConfig);

            // Then
            using (new AssertionScope())
            {
                returnedAnime.Should().NotBeNull();
                returnedAnime.Results.Should().NotBeEmpty();
            }
        }
示例#4
0
        public async Task SearchAnime_GenreExclusion_ShouldReturnNotEmptyCollection()
        {
            // Given
            var searchConfig = new AnimeSearchConfig
            {
                Genres = new List <GenreSearch> {
                    GenreSearch.Action, GenreSearch.Adventure
                },
                GenreIncluded = false,
                OrderBy       = AnimeSearchSortable.Score,
                SortDirection = SortDirection.Descending
            };

            // When
            AnimeSearchResult returnedAnime = await _jikan.SearchAnime(searchConfig);

            // Then
            using (new AssertionScope())
            {
                returnedAnime.Should().NotBeNull();
                returnedAnime.Results.Should().NotBeEmpty();
            }
        }