Ejemplo n.º 1
0
        public void WhenGettingAllTvShows_ItShouldReturnAListOfTvShows()
        {
            var service = new KodiService();

            var parameters = new GetTvShowsParams
            {
                Properties = new[] { TvShowProperties.Title, TvShowProperties.Year }
            };

            var details = service.GetTvShows(parameters);

            Assert.IsNotNull(details);
            Assert.IsNotNull(details.Result);
            Assert.Greater(details.Result.TvShows.Count, 0);
            Assert.IsInstanceOf <List <TvShow> >(details.Result.TvShows);
        }
Ejemplo n.º 2
0
        public void WhenGettingAllTvShows_WithALimitOf0And1_ItShouldReturnAListWithOneTvShow()
        {
            var service = new KodiService();

            var parameters = new GetTvShowsParams
            {
                Properties = new[] { TvShowProperties.Title },
                Limits     = new Limits
                {
                    Start = 0,
                    End   = 1
                }
            };

            var details = service.GetTvShows(parameters);

            Assert.IsNotNull(details);
            Assert.IsNotNull(details.Result);
            Assert.That(details.Result.TvShows.Count, Is.EqualTo(1));
            Assert.IsInstanceOf <List <TvShow> >(details.Result.TvShows);
        }