Exemple #1
0
        public void WhenGettingEpisodeDetails_WithAnInvalidEpisodeId_ItShouldThrowException()
        {
            var service = new KodiService();

            var parameters = new GetEpisodeDetailsParams
            {
                EpisodeId = (int)Episodes.TestSet.InvalidId
            };

            Assert.That(() => service.GetEpisodeDetails(parameters, "UnitTests"), Throws.Exception.TypeOf <Exception>());
        }
Exemple #2
0
        public void WhenGettingAnEpisode_WithAnEpisodeIdOfOne_ItShouldReturnAnEpisode()
        {
            var service = new KodiService();

            var parameters = new GetEpisodeDetailsParams
            {
                EpisodeId  = 1,
                Properties = new[] { EpisodeProperties.Title, EpisodeProperties.UniqueId }
            };

            var details = service.GetEpisodeDetails(parameters);

            Assert.IsNotNull(details);
            Assert.IsNotNull(details.Result);
            Assert.AreEqual(1, details.Result.EpisodeDetails.EpisodeId);
        }