public async Task GetUserClubsAsync_InvalidUsername_ShouldThrowValidationException(string username)
        {
            // When
            var func = _jikan.Awaiting(x => x.GetUserClubsAsync(username));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
Beispiel #2
0
        public async Task GetMangaPictures_InvalidId_ShouldThrowValidationException(long id)
        {
            // When
            Func <Task <MangaPictures> > func = _jikan.Awaiting(x => x.GetMangaPictures(id));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
Beispiel #3
0
        public async Task GetMangaNewsAsync_InvalidId_ShouldThrowValidationException(long malId)
        {
            // When
            var func = _jikan.Awaiting(x => x.GetMangaNewsAsync(malId));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
Beispiel #4
0
        public async Task GetTopAnimeAsync_InvalidPage_ShouldThrowValidationException(int page)
        {
            // When
            var func = _jikan.Awaiting(x => x.GetTopAnimeAsync(page));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
        public async Task SearchCharacter_InvalidQuery_ShouldThrowValidationException(string query)
        {
            // When
            Func <Task <CharacterSearchResult> > func = _jikan.Awaiting(x => x.SearchCharacter(query));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
Beispiel #6
0
        public void GetAnime_WrongIdDoNotSurpressExceptions_ShouldThrowJikanRequestExceptionGetAnime()
        {
            // When
            Func <Task <Anime> > func = _jikan.Awaiting(x => x.GetAnime(2));

            // Then
            func.Should().ThrowExactlyAsync <JikanRequestException>();
        }
Beispiel #7
0
        public async Task GetAnimeGenre_InvalidId_ShouldThrowValidationException(long id)
        {
            // When
            Func <Task <AnimeGenre> > func = _jikan.Awaiting(x => x.GetAnimeGenre(id));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
Beispiel #8
0
        public async Task GetPerson_InvalidId_ShouldThrowValidationException(long malId)
        {
            // When
            Func <Task <Person> > func = _jikan.Awaiting(x => x.GetPerson(malId));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
        public async Task SearchCharacterAsync_InvalidPage_ShouldThrowValidationException(int page)
        {
            // Given
            var config = new CharacterSearchConfig {
                Page = page
            };

            // When
            var func = _jikan.Awaiting(x => x.SearchCharacterAsync(config));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
Beispiel #10
0
        public async Task GetUserProfile_InvalidUsername_ShouldThrowValidationException(string username)
        {
            // When
            Func <Task <UserProfile> > func = _jikan.Awaiting(x => x.GetUserProfile(username));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
        public async Task GetMangaGenresAsync_InvalidFilter_ShouldThrowValidationException(GenresFilter filter)
        {
            // When
            var func = _jikan.Awaiting(x => x.GetMangaGenresAsync(filter));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
Beispiel #12
0
        public async Task GetSeasonAsync_InvalidYear_ShouldThrowValidationException(int year)
        {
            // When
            var func = _jikan.Awaiting(x => x.GetSeasonAsync(year, Season.Fall));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }
Beispiel #13
0
        public async Task GetCharacterPicturesAsync_InvalidId_ShouldThrowValidationException(long id)
        {
            // When
            var func = _jikan.Awaiting(x => x.GetCharacterPicturesAsync(id));

            // Then
            await func.Should().ThrowExactlyAsync <JikanValidationException>();
        }