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

            var parameters = new GetSeasonsParams
            {
                TvShowId   = 1,
                Properties = new[] { SeasonProperties.ShowTitle, SeasonProperties.SeasonNumber }
            };

            var details = service.GetSeasons(parameters);

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

            var parameters = new GetSeasonsParams
            {
                TvShowId   = 1,
                Properties = new[] { SeasonProperties.ShowTitle },
                Limits     = new Limits
                {
                    Start = 0,
                    End   = 1
                }
            };

            var details = service.GetSeasons(parameters);

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