Пример #1
0
        public async Task Get_Always_ReturnsMetadata()
        {
            // Arrange
            TvShowMetadata expectedMetadata = new TvShowMetadata();

            _metadataRepository.Get(_path)
            .Returns(expectedMetadata.ToTask());

            // Act
            TvShowMetadata metadata = await _service.Get(_path);

            // Assert
            Assert.Equal(expectedMetadata, metadata);
        }
        public async Task <TvShowMetadata> Get(string path)
        {
            TvShowMetadata metadata = await _metadataRepository.Get(path);

            foreach (ActorMetadata actor in metadata.Actors)
            {
                actor.ThumbPath = ActorMetadata.GetActorThumbPath(path, actor.Name);
            }
            return(metadata);
        }