コード例 #1
0
        public async Task ShouldBeAbleToAllAlbums()
        {
            Plex.Api.Instance     api             = new Plex.Api.Instance(new Uri("http://winplex:32400"));
            Plex.Section.Provider sectionProvider = new Plex.Section.Provider(api);

            Plex.Music.Album.Provider provider = new Plex.Music.Album.Provider(sectionProvider, api);

            IList <Plex.Music.IAlbum> artists = await provider.All.ToList();

            Assert.That(artists, Is.Not.Null);
            Assert.That(artists.Count, Is.GreaterThan(0));
        }
コード例 #2
0
        public async Task ShouldBeAbleToAllAlbums()
        {
            Plex.Api.Instance api = new Plex.Api.Instance(new Uri("http://winplex:32400"));
            Plex.Section.Provider sectionProvider = new Plex.Section.Provider(api);

            Plex.Music.Album.Provider provider = new Plex.Music.Album.Provider(sectionProvider, api);

            IList<Plex.Music.IAlbum> artists = await provider.All.ToList();

            Assert.That(artists, Is.Not.Null);
            Assert.That(artists.Count, Is.GreaterThan(0));
        }
コード例 #3
0
        public async Task ShouldBeAbleToRetrieveTracksForAlbum(string albumMetadataKey)
        {
            Plex.Api.Instance api = new Plex.Api.Instance(new Uri("http://winplex:32400"));

            Plex.Music.Track.Provider provider = new Plex.Music.Track.Provider(api);

            Plex.Music.IAlbum artist = A.Fake<Plex.Music.IAlbum>();
            A.CallTo(() => artist.Key).Returns(albumMetadataKey);

            IList<Plex.Music.ITrack> artists = await provider.ForAlbum(artist).ToList();

            Assert.That(artists, Is.Not.Null);
            Assert.That(artists.Count, Is.GreaterThan(0));
        }
コード例 #4
0
        public async Task ShouldBeAbleToRetrieveTracksForAlbum(string albumMetadataKey)
        {
            Plex.Api.Instance api = new Plex.Api.Instance(new Uri("http://winplex:32400"));

            Plex.Music.Track.Provider provider = new Plex.Music.Track.Provider(api);

            Plex.Music.IAlbum artist = A.Fake <Plex.Music.IAlbum>();
            A.CallTo(() => artist.Key).Returns(albumMetadataKey);

            IList <Plex.Music.ITrack> artists = await provider.ForAlbum(artist).ToList();

            Assert.That(artists, Is.Not.Null);
            Assert.That(artists.Count, Is.GreaterThan(0));
        }