public async Task GetAnimeAsync_CorrectId_ShouldReturnNotNullAnime(long malId) { // When var returnedAnime = await _jikan.GetAnimeAsync(malId); // Then returnedAnime.Should().NotBeNull(); }
public async Task <MalAnimeUpdateData> GetAnimeDataAsync(long malId) { var parsedData = await _jikanClient.GetAnimeAsync(malId); if (parsedData?.Data is null) { return(null); } return(new MalAnimeUpdateData( parsedData.Data.Title, parsedData.Data.Synopsis, parsedData.Data.TitleEnglish, parsedData.Data.TitleJapanese, (parsedData.Data.TitleSynonyms != null && parsedData.Data.TitleSynonyms.Any()) ? string.Join(';', parsedData.Data.TitleSynonyms) : string.Empty, parsedData.Data.Members, EmptyStringIfPlaceholder(parsedData.Data.Images?.JPG?.ImageUrl), parsedData.Data.Aired?.From, parsedData.Data.Type, parsedData.Data.Status, parsedData.Data.Season.ToString(), parsedData.Data.Year )); }