private void ThenGrandParentRatingKeyWasUsed()
        {
            var grandParentKeys =
                _plexLibraryContainer.MediaContainer.Metadata.Select(x => Convert.ToInt32(x.GrandParentRatingKey)).ToArray();

            foreach (var key in grandParentKeys)
            {
                _mediaItemProcessor.Received().GetMediaItem(Arg.Is(key), Arg.Any <PlexMediaTypes>(),
                                                            Arg.Any <List <PlexMediaItemRow> >(), Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>());
            }
        }
            public async Task GetsResult()
            {
                await _seriesProvider.GetMetadata(_seriesInfo, CancellationToken.None);

                _mediaItemProcessor.Received(1)
                .GetResultAsync(_seriesInfo, MediaItemTypes.Series, Enumerable.Empty <EmbyItemId>());
            }
            public async Task ProvidesParentIds()
            {
                _episodeInfo.SeriesProviderIds = new Dictionary <string, string>
                {
                    { SourceNames.AniDb, "929" }
                };

                await _episodeProvider.GetMetadata(_episodeInfo, CancellationToken.None);

                _mediaItemProcessor.Received(1)
                .GetResultAsync(_episodeInfo, MediaItemTypes.Episode, Arg.Is <IEnumerable <EmbyItemId> >(ids => ids.Count() == 1 &&
                                                                                                         ids.Single().Id == 929 &&
                                                                                                         ids.Single().ItemType == MediaItemTypes.Series &&
                                                                                                         ids.Single().SourceName == SourceNames.AniDb));
            }
Beispiel #4
0
 private void ThenAMediaItemWasProcessed()
 {
     _mediaItemProcessor.Received().GetMediaItem(Arg.Any <int>(), Arg.Any <PlexMediaTypes>(), Arg.Any <List <PlexMediaItemRow> >(),
                                                 Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>());
 }