Пример #1
0
        public async Task FindImages_Always_ReturnsSeries()
        {
            // Arrange
            const string serieId = "78901";

            AvailableTvShowImages expectedImages = new AvailableTvShowImages
            {
                Banners = new List <Image> {
                    new Image {
                        Url = "http://thetvtdb.com/banner.jpg"
                    }
                },
                Fanarts = new List <Image> {
                    new Image {
                        Url = "http://thetvtdb.com/fanart.jpg"
                    }
                },
                Posters = new List <Image> {
                    new Image {
                        Url = "http://thetvtdb.com/poster.jpg"
                    }
                },
                Seasons = new Dictionary <int, AvailableSeasonImages>
                {
                    { 0, new AvailableSeasonImages
                      {
                          Banners = new List <Image> {
                              new Image {
                                  Url = "http://thetvdb.com/specials-banner.jpg"
                              }
                          },
                          Posters = new List <Image> {
                              new Image {
                                  Url = "http://thetvdb.com/specials-poster.jpg"
                              }
                          },
                      } }
                }
            };

            _metadataUpdater.FindImages(serieId)
            .Returns(expectedImages.ToTask());

            // Act
            AvailableTvShowImages images = await _service.FindImages(serieId);

            // Assert
            Assert.Equal(expectedImages, images);
        }
 public Task <AvailableTvShowImages> FindImages(string seriesId)
 {
     return(_metadataUpdater.FindImages(seriesId));
 }