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));
        }
        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));
        }
        public async Task ShouldBeAbleToGetSections()
        {
            Plex.Section.Provider provider = new Plex.Section.Provider(
                new Plex.Api.Instance(new Uri("http://winplex:32400"))
            );

            IList<Plex.Section.ISection> sections = await provider.All.ToList();

            Assert.That(sections.Count, Is.EqualTo(4));
            Assert.That(sections.OfType<Plex.Section.IMusic>().Count(), Is.EqualTo(1));
            Assert.That(sections.OfType<Plex.Section.IMusic>().Single().Key, Is.EqualTo("5"));
            Assert.That(sections.OfType<Plex.Section.IShow>().Count(), Is.EqualTo(2));
            Assert.That(sections.OfType<Plex.Section.IMovie>().Count(), Is.EqualTo(1));
        }
        public async Task ShouldBeAbleToGetSections()
        {
            Plex.Section.Provider provider = new Plex.Section.Provider(
                new Plex.Api.Instance(new Uri("http://winplex:32400"))
                );

            IList <Plex.Section.ISection> sections = await provider.All.ToList();

            Assert.That(sections.Count, Is.EqualTo(4));
            Assert.That(sections.OfType <Plex.Section.IMusic>().Count(), Is.EqualTo(1));
            Assert.That(sections.OfType <Plex.Section.IMusic>().Single().Key, Is.EqualTo("5"));
            Assert.That(sections.OfType <Plex.Section.IShow>().Count(), Is.EqualTo(2));
            Assert.That(sections.OfType <Plex.Section.IMovie>().Count(), Is.EqualTo(1));
        }
        public async Task ShouldBeAbleToRetrieveAlbumsForArtist(string artistMetadataKey)
        {
            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);

            Plex.Music.IArtist artist = A.Fake <Plex.Music.IArtist>();
            A.CallTo(() => artist.Key).Returns(artistMetadataKey);

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

            Assert.That(artists, Is.Not.Null);
            Assert.That(artists.Count, Is.GreaterThan(0));
        }
        public async Task ShouldBeAbleToRetrieveAlbumsForArtist(string artistMetadataKey)
        {
            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);

            Plex.Music.IArtist artist = A.Fake<Plex.Music.IArtist>();
            A.CallTo(() => artist.Key).Returns(artistMetadataKey);

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

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