private async Task <FullSerie> FindFullSerie(string path)
        {
            string seriesId = await GetSeriesId(path);

            FullSerie fullSerie = await _metadataUpdater.GetTvShowMetadata(seriesId);

            if (fullSerie == null)
            {
                throw new TvShowNotFoundException(path);
            }
            return(fullSerie);
        }
예제 #2
0
        public async Task Update_WhenSerieAlreadyHasMetadata_UpdatesImages()
        {
            // Arrange
            _metadataRepository.Get(_path)
            .Returns(new TvShowMetadata {
                Id = "456"
            }.ToTask());

            FullSerie fullSerie = CreateFullSerie();

            _metadataUpdater.GetTvShowMetadata("456")
            .Returns(fullSerie.ToTask());

            // Act
            await _service.Update(_path);

            // Assert
            _imageService.Received()
            .Update(_path, Arg.Any <AvailableTvShowImages>()).Async();
        }