Ejemplo n.º 1
0
        public void TestCollectionsExtrasAll()
        {
            CollectionMethods combinedEnum = _methods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Collection        item         = Config.Client.GetCollectionAsync(IdHelper.JamesBondCollection, combinedEnum).Result;

            TestMethodsHelper.TestAllNotNull(_methods, item);
        }
Ejemplo n.º 2
0
        public void TestMoviesExtrasAll()
        {
            MovieMethods combinedEnum = _methods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Movie        item         = _config.Client.GetMovie(AGoodDayToDieHard, combinedEnum);

            TestMethodsHelper.TestAllNotNull(_methods, item);
        }
Ejemplo n.º 3
0
        public void TestCompaniesExtrasAll()
        {
            CompanyMethods combinedEnum = _methods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Company        item         = _config.Client.GetCompany(TwentiethCenturyFox, combinedEnum);

            TestMethodsHelper.TestAllNotNull(_methods, item);
        }
Ejemplo n.º 4
0
        public void TestPersonsExtrasAll()
        {
            PersonMethods combinedEnum = _methods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Person        item         = _config.Client.GetPerson(BruceWillis, combinedEnum);

            TestMethodsHelper.TestAllNotNull(_methods, item);
        }
Ejemplo n.º 5
0
        public void TestMoviesExtrasAll()
        {
            _config.Client.SetSessionInformation(_config.UserSessionId, SessionType.UserSession);
            MovieMethods combinedEnum = _methods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Movie        item         = _config.Client.GetMovie(AGoodDayToDieHard, combinedEnum);

            TestMethodsHelper.TestAllNotNull(_methods, item);
        }
Ejemplo n.º 6
0
        public void TestTvSeasonExtrasAll()
        {
            TvEpisodeMethods combinedEnum = _methods.Keys.Aggregate((methods, tvEpisodeMethods) => methods | tvEpisodeMethods);
            TvEpisode        tvEpisode    = _config.Client.GetTvEpisode(BreakingBad, 1, 1, combinedEnum);

            TestBreakingBadSeasonOneEpisodeOneBaseProperties(tvEpisode);

            TestMethodsHelper.TestAllNotNull(_methods, tvEpisode);
        }
Ejemplo n.º 7
0
        public void TestTvShowExtrasAll()
        {
            TvShowMethods combinedEnum = _methods.Keys.Aggregate((methods, tvShowMethods) => methods | tvShowMethods);
            TvShow        tvShow       = _config.Client.GetTvShow(BreakingBad, combinedEnum);

            TestBreakingBadBaseProperties(tvShow);

            TestMethodsHelper.TestAllNotNull(_methods, tvShow);
        }
Ejemplo n.º 8
0
        public void TestPersonsExtrasAll()
        {
            IgnoreMissingJson("external_ids / id", "images / id", "movie_credits / id", "tv_credits / id");

            PersonMethods combinedEnum = _methods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Person        item         = Config.Client.GetPersonAsync(IdHelper.BruceWillis, combinedEnum).Result;

            TestMethodsHelper.TestAllNotNull(_methods, item);
        }
Ejemplo n.º 9
0
        public void TestCollectionsExtrasAll()
        {
            // Ignore missing json
            IgnoreMissingJson("parts[array] / media_type");

            CollectionMethods combinedEnum = _methods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Collection        item         = Config.Client.GetCollectionAsync(IdHelper.JamesBondCollection, combinedEnum).Result;

            TestMethodsHelper.TestAllNotNull(_methods, item);
        }
Ejemplo n.º 10
0
        public void TestCompaniesExtrasAll()
        {
            // Ignore missing json
            IgnoreMissingJson("movies.results[array] / media_type");

            CompanyMethods combinedEnum = _methods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Company        item         = Config.Client.GetCompanyAsync(IdHelper.TwentiethCenturyFox, combinedEnum).Result;

            TestMethodsHelper.TestAllNotNull(_methods, item);
        }
Ejemplo n.º 11
0
        public void TestMoviesImdbExtrasAll()
        {
            Dictionary <MovieMethods, Func <Movie, object> > tmpMethods = new Dictionary <MovieMethods, Func <Movie, object> >(_methods);

            tmpMethods.Remove(MovieMethods.Changes);
            tmpMethods.Remove(MovieMethods.SimilarMovies);      // See https://github.com/LordMike/TMDbLib/issues/19

            MovieMethods combinedEnum = tmpMethods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Movie        item         = _config.Client.GetMovie(AGoodDayToDieHardImdb, combinedEnum);

            TestMethodsHelper.TestAllNotNull(tmpMethods, item);
        }
Ejemplo n.º 12
0
        public void TestMoviesExtrasAll()
        {
            // We ignore the 'notes' field, as TMDb sometimes leaves it out
            IgnoreMissingJson("release_dates.results[array].release_dates[array] / note");

            IgnoreMissingJson(" / id", "alternative_titles / id", "credits / id", "keywords / id", "release_dates / id", "releases / id", "translations / id", "videos / id");

            Config.Client.SetSessionInformation(Config.UserSessionId, SessionType.UserSession);
            MovieMethods combinedEnum = _methods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Movie        item         = Config.Client.GetMovieAsync(IdHelper.AGoodDayToDieHard, combinedEnum).Result;

            TestMethodsHelper.TestAllNotNull(_methods, item);
        }
Ejemplo n.º 13
0
        public void TestMoviesImdbExtrasAll()
        {
            Dictionary <MovieMethods, Func <Movie, object> > tmpMethods = new Dictionary <MovieMethods, Func <Movie, object> >(_methods);

            tmpMethods.Remove(MovieMethods.Videos);

            _config.Client.SetSessionInformation(_config.UserSessionId, SessionType.UserSession);

            MovieMethods combinedEnum = tmpMethods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Movie        item         = _config.Client.GetMovie(TheDarkKnightRisesImdb, combinedEnum);

            TestMethodsHelper.TestAllNotNull(tmpMethods, item);
        }
Ejemplo n.º 14
0
        public void TestTvEpisodeExtrasAll()
        {
            TvEpisodeMethods combinedEnum = _methods.Keys.Aggregate((methods, tvEpisodeMethods) => methods | tvEpisodeMethods);
            TvEpisode        tvEpisode    = _config.Client.GetTvEpisode(BreakingBad, 1, 1, combinedEnum);

            TestBreakingBadSeasonOneEpisodeOneBaseProperties(tvEpisode);

            Assert.IsNotNull(tvEpisode.Images);
            Assert.IsNotNull(tvEpisode.Images.Stills);
            Assert.IsTrue(tvEpisode.Images.Stills.Count > 0);

            TestMethodsHelper.TestAllNotNull(_methods, tvEpisode);
        }
Ejemplo n.º 15
0
        public void TestTvShowExtrasAll()
        {
            _config.Client.SetSessionInformation(_config.UserSessionId, SessionType.UserSession);

            // Account states will only show up if we've done something
            _config.Client.TvShowSetRating(BreakingBad, 5);

            TvShowMethods combinedEnum = _methods.Keys.Aggregate((methods, tvShowMethods) => methods | tvShowMethods);
            TvShow        tvShow       = _config.Client.GetTvShow(BreakingBad, combinedEnum).Result;

            TestBreakingBadBaseProperties(tvShow);

            TestMethodsHelper.TestAllNotNull(_methods, tvShow);
        }
Ejemplo n.º 16
0
        public void TestTvSeasonExtrasAll()
        {
            _config.Client.SetSessionInformation(_config.UserSessionId, SessionType.UserSession);

            // Account states will only show up if we've done something
            _config.Client.TvEpisodeSetRatingAsync(IdHelper.BreakingBad, 1, 1, 5).Wait();

            TvSeasonMethods combinedEnum = _methods.Keys.Aggregate((methods, tvSeasonMethods) => methods | tvSeasonMethods);
            TvSeason        tvSeason     = _config.Client.GetTvSeasonAsync(IdHelper.BreakingBad, 1, combinedEnum).Result;

            TestBreakingBadBaseProperties(tvSeason);

            TestMethodsHelper.TestAllNotNull(_methods, tvSeason);
        }
Ejemplo n.º 17
0
        public void TestMoviesImdbExtrasAll()
        {
            Dictionary <MovieMethods, Func <Movie, object> > tmpMethods = new Dictionary <MovieMethods, Func <Movie, object> >(_methods);

            tmpMethods.Remove(MovieMethods.Videos);

            _config.Client.SetSessionInformation(_config.UserSessionId, SessionType.UserSession);

            // Account states will only show up if we've done something
            _config.Client.MovieSetRating(TheDarkKnightRises, 5);

            MovieMethods combinedEnum = tmpMethods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Movie        item         = _config.Client.GetMovie(TheDarkKnightRises, combinedEnum).Result;

            TestMethodsHelper.TestAllNotNull(tmpMethods, item);
        }
Ejemplo n.º 18
0
        public void TestTvShowExtrasAll()
        {
            IgnoreMissingJson(" / id");
            IgnoreMissingJson(" / genre_ids", " / known_for", " / similar", " / translations", " / videos", "alternative_titles / id", "content_ratings / id", "credits / id", "external_ids / id", "keywords / id", " / recommendations");

            Config.Client.SetSessionInformation(Config.UserSessionId, SessionType.UserSession);

            // Account states will only show up if we've done something
            Config.Client.TvShowSetRatingAsync(IdHelper.BreakingBad, 5).Sync();

            TvShowMethods combinedEnum = _methods.Keys.Aggregate((methods, tvShowMethods) => methods | tvShowMethods);
            TvShow        tvShow       = Config.Client.GetTvShowAsync(IdHelper.BreakingBad, combinedEnum).Result;

            TestBreakingBadBaseProperties(tvShow);

            TestMethodsHelper.TestAllNotNull(_methods, tvShow);
        }
Ejemplo n.º 19
0
        public void TestMoviesImdbExtrasAll()
        {
            IgnoreMissingJson(" / id", " / videos", "alternative_titles / id", "credits / id", "keywords / id", "release_dates / id", "releases / id", "reviews.results[array] / media_type", "translations / id");

            Dictionary <MovieMethods, Func <Movie, object> > tmpMethods = new Dictionary <MovieMethods, Func <Movie, object> >(_methods);

            tmpMethods.Remove(MovieMethods.Videos);

            Config.Client.SetSessionInformation(Config.UserSessionId, SessionType.UserSession);

            // Account states will only show up if we've done something
            Config.Client.MovieSetRatingAsync(IdHelper.TheDarkKnightRises, 5).Sync();

            MovieMethods combinedEnum = tmpMethods.Keys.Aggregate((methods, movieMethods) => methods | movieMethods);
            Movie        item         = Config.Client.GetMovieAsync(IdHelper.TheDarkKnightRises, combinedEnum).Result;

            TestMethodsHelper.TestAllNotNull(tmpMethods, item);
        }
Ejemplo n.º 20
0
        public void TestTvEpisodeExtrasAll()
        {
            _config.Client.SetSessionInformation(_config.UserSessionId, SessionType.UserSession);

            // Account states will only show up if we've done something
            _config.Client.TvEpisodeSetRatingAsync(IdHelper.BreakingBad, 1, 1, 5).Wait();

            TvEpisodeMethods combinedEnum = _methods.Keys.Aggregate((methods, tvEpisodeMethods) => methods | tvEpisodeMethods);
            TvEpisode        tvEpisode    = _config.Client.GetTvEpisodeAsync(IdHelper.BreakingBad, 1, 1, combinedEnum).Result;

            TestBreakingBadSeasonOneEpisodeOneBaseProperties(tvEpisode);

            Assert.IsNotNull(tvEpisode.Images);
            Assert.IsNotNull(tvEpisode.Images.Stills);
            Assert.IsTrue(tvEpisode.Images.Stills.Count > 0);

            TestMethodsHelper.TestAllNotNull(_methods, tvEpisode);
        }
Ejemplo n.º 21
0
        public void TestTvSeasonExtrasAll()
        {
            // TMDb is sending an extra property
            IgnoreMissingCSharp("_id / _id");

            IgnoreMissingJson("images / id", "account_states / id", "credits / id", "external_ids / id", "videos / id");

            Config.Client.SetSessionInformation(Config.UserSessionId, SessionType.UserSession);

            // Account states will only show up if we've done something
            Config.Client.TvEpisodeSetRatingAsync(IdHelper.BreakingBad, 1, 1, 5).Sync();

            TvSeasonMethods combinedEnum = _methods.Keys.Aggregate((methods, tvSeasonMethods) => methods | tvSeasonMethods);
            TvSeason        tvSeason     = Config.Client.GetTvSeasonAsync(IdHelper.BreakingBad, 1, combinedEnum).Result;

            TestBreakingBadBaseProperties(tvSeason);

            TestMethodsHelper.TestAllNotNull(_methods, tvSeason);
        }
        public void TestTvEpisodeExtrasAll()
        {
            IgnoreMissingJson("credits / id", "external_ids / id", "images / id", "videos / id");

            Config.Client.SetSessionInformation(Config.UserSessionId, SessionType.UserSession);

            // Account states will only show up if we've done something
            Config.Client.TvEpisodeSetRatingAsync(IdHelper.BreakingBad, 1, 1, 5).Sync();

            TvEpisodeMethods combinedEnum = _methods.Keys.Aggregate((methods, tvEpisodeMethods) => methods | tvEpisodeMethods);
            TvEpisode        tvEpisode    = Config.Client.GetTvEpisodeAsync(IdHelper.BreakingBad, 1, 1, combinedEnum).Result;

            TestBreakingBadSeasonOneEpisodeOneBaseProperties(tvEpisode);

            Assert.NotNull(tvEpisode.Images);
            Assert.NotNull(tvEpisode.Images.Stills);
            Assert.True(tvEpisode.Images.Stills.Count > 0);

            TestMethodsHelper.TestAllNotNull(_methods, tvEpisode);
        }