示例#1
0
        public void TestAccountGetRatedTv()
        {
            // Ignore missing json
            IgnoreMissingJson("results[array] / media_type");

            Config.Client.SetSessionInformation(Config.UserSessionId, SessionType.UserSession);
            TestHelpers.SearchPages(i => Config.Client.AccountGetRatedTvShowsAsync(i).Result);
            AccountSearchTv tvShow = Config.Client.AccountGetRatedTvShowsAsync().Sync().Results[0];

            // Requires that you have rated at least one movie else this test will fail
            Assert.True(tvShow.Id > 0);
            Assert.NotNull(tvShow.Name);
            Assert.NotNull(tvShow.PosterPath);
            Assert.NotNull(tvShow.BackdropPath);
            Assert.NotNull(tvShow.OriginalName);
            Assert.NotNull(tvShow.Overview);
            Assert.NotNull(tvShow.OriginalLanguage);
            Assert.NotNull(tvShow.FirstAirDate);
            Assert.True(tvShow.VoteCount > 0);
            Assert.True(tvShow.VoteAverage > 0);
            Assert.True(tvShow.Popularity > 0);

            Assert.NotNull(tvShow.GenreIds);
            Assert.True(tvShow.GenreIds.Any());
        }
示例#2
0
        public async Task TestAccountGetRatedTv()
        {
            await TMDbClient.SetSessionInformationAsync(TestConfig.UserSessionId, SessionType.UserSession);

            await TestHelpers.SearchPagesAsync(i => TMDbClient.AccountGetRatedTvShowsAsync(i));

            SearchContainer <AccountSearchTv> tvShows = await TMDbClient.AccountGetRatedTvShowsAsync();

            AccountSearchTv tvShow = tvShows.Results.Single(s => s.Id == IdHelper.BigBangTheory);

            await Verify(tvShow);
        }
示例#3
0
 public RatedShowItemViewModel(AccountSearchTv ratedShow) : base(ratedShow)
 {
     ItemRating = Math.Round(ratedShow.Rating).ToString();
 }