public async Task GetManga_CorrectId_ShouldReturnNotNullManga(long malId) { // When var returedManga = await _jikan.GetManga(malId); // Then returedManga.Should().NotBeNull(); }
public void ShouldUseIMalEntityInterface() { IMalEntity berserk = Task.Run(() => jikan.GetManga(2)).Result; IMalEntity bebop = Task.Run(() => jikan.GetAnime(1)).Result; List <IMalEntity> entities = new List <IMalEntity>(); entities.Add(berserk); entities.Add(bebop); Assert.Contains(1, entities.Select(x => x.MalId)); }
public async Task GetAnimeGetManga_CorrectId_ShouldUseIMalEntityInterface() { IMalEntity berserk = await jikan.GetManga(2); IMalEntity bebop = await jikan.GetAnime(1); List <IMalEntity> entities = new List <IMalEntity>(); entities.Add(berserk); entities.Add(bebop); Assert.Contains(1, entities.Select(x => x.MalId)); }
public async Task GetAnimeGetManga_CorrectId_ShouldUseIMalEntityInterface() { // Given IMalEntity berserk = await _jikan.GetManga(2); IMalEntity bebop = await _jikan.GetAnime(1); List <IMalEntity> entities = new List <IMalEntity> { berserk, bebop }; // When var ids = entities.Select(x => x.MalId); // Then ids.Should().Contain(1); }
public async Task GetManga_CorrectId_ShouldReturnNotNullManga(long malId) { Manga returedManga = await jikan.GetManga(malId); Assert.NotNull(returedManga); }
public void GetManga_WrongIdDoNotSurpressExceptions_ShouldThrowJikanRequestExceptionGetManga() { Assert.ThrowsAnyAsync <JikanRequestException>(() => jikan.GetManga(5)); }
public void ShouldThrowJikanRequestExceptionGetManga() { Assert.ThrowsAnyAsync <JikanRequestException>(() => jikan.GetManga(5)); }
public void ShouldReturnNotNullManga(long malId) { Manga returedManga = Task.Run(() => jikan.GetManga(malId)).Result; Assert.NotNull(returedManga); }