public async Task GetCardInfo_NotExistingAnime_ShouldReturnEmptyInfo() { // Given const int wrongId = int.MaxValue; var api = new AnimeApi(requester); // When var apiResult = await api.GetCardInfoAsync(wrongId); // Then apiResult.Should().BeNull(); }
public async Task GetCardInfo_ExistingAnime_ShouldReturnCardInfo() { // Given const int cowboyBebopId = 1; var api = new AnimeApi(requester); // When var apiResult = await api.GetCardInfoAsync(cowboyBebopId); // Then using var scope = new AssertionScope(); apiResult.Title.Should().Be("Cowboy Bebop"); apiResult.Type.Should().Be("TV"); apiResult.ImageUrl.Should().NotBeNullOrWhiteSpace(); apiResult.MalId.Should().Be(cowboyBebopId); apiResult.Status.Should().Be("Finished Airing"); }