Esempio n. 1
0
        public void WhenGettingMovieDetails_WithAnInvalidMovieId_ItShouldThrowException()
        {
            var service = new KodiService();

            var parameters = new GetMovieDetailsParams
            {
                MovieId = (int)Movies.TestSet.InvalidId
            };

            Assert.That(() => service.GetMovieDetails(parameters, "UnitTests"), Throws.Exception.TypeOf <Exception>());
        }
Esempio n. 2
0
        public void WhenGettingMovieDetails_WithAMovieIdOfOne_ItShouldReturnAMovie()
        {
            var service = new KodiService();

            var parameters = new GetMovieDetailsParams
            {
                MovieId    = 1,
                Properties = new[] { MovieProperties.Title, MovieProperties.Year }
            };

            var details = service.GetMovieDetails(parameters);

            Assert.IsNotNull(details);
            Assert.IsNotNull(details.Result);
            Assert.AreEqual(1, details.Result.MovieDetails.MovieId);
        }