Esempio n. 1
0
        public async Task Get_WhenMetadataRepositoryReturnsMetadata_ReturnsIt()
        {
            // Arrange
            MovieMetadata metadata = new MovieMetadata();

            _metadataRepository.Get(MovieFile)
            .Returns(metadata.ToTask());

            // Act
            MovieMetadata actualMetadata = await _service.Get(MovieFile);

            // Assert
            Assert.Same(metadata, actualMetadata);
        }
        /// <summary>
        /// Gets metadata about the movie located at the specified path.
        /// </summary>
        /// <param name="path">The movie file path.</param>
        /// <returns></returns>
        public async Task <MovieMetadata> Get(string path)
        {
            MovieMetadata metadata = await _metadataRepository.Get(path);

            SetActorsThumbPath(path, metadata);
            SetImagesPath(path, metadata);
            return(metadata);
        }