public async Task Test_ListItemObjectJsonReader_Episode_ReadObject_From_Stream_Incomplete_10()
        {
            var jsonReader = new ListItemObjectJsonReader();

            using (var stream = TYPE_EPISODE_JSON_INCOMPLETE_10.ToStream())
            {
                var traktListItem = await jsonReader.ReadObjectAsync(stream);

                traktListItem.Should().NotBeNull();
                traktListItem.Rank.Should().BeNull();
                traktListItem.ListedAt.Should().BeNull();
                traktListItem.Type.Should().BeNull();
                traktListItem.Episode.Should().BeNull();
                traktListItem.Show.Should().NotBeNull();
                traktListItem.Show.Title.Should().Be("Game of Thrones");
                traktListItem.Show.Year.Should().Be(2011);
                traktListItem.Show.Ids.Should().NotBeNull();
                traktListItem.Show.Ids.Trakt.Should().Be(1390U);
                traktListItem.Show.Ids.Slug.Should().Be("game-of-thrones");
                traktListItem.Show.Ids.Tvdb.Should().Be(121361U);
                traktListItem.Show.Ids.Imdb.Should().Be("tt0944947");
                traktListItem.Show.Ids.Tmdb.Should().Be(1399U);
                traktListItem.Show.Ids.TvRage.Should().Be(24493U);

                traktListItem.Movie.Should().BeNull();
                traktListItem.Season.Should().BeNull();
                traktListItem.Person.Should().BeNull();
            }
        }
        public async Task Test_UserWatchingItemObjectJsonReader_Episode_ReadObject_From_Stream_Incomplete_10()
        {
            var jsonReader = new UserWatchingItemObjectJsonReader();

            using (var stream = TYPE_EPISODE_JSON_INCOMPLETE_10.ToStream())
            {
                var traktUserWatchingItem = await jsonReader.ReadObjectAsync(stream);

                traktUserWatchingItem.Should().NotBeNull();
                traktUserWatchingItem.StartedAt.Should().BeNull();
                traktUserWatchingItem.ExpiresAt.Should().BeNull();
                traktUserWatchingItem.Action.Should().BeNull();
                traktUserWatchingItem.Type.Should().Be(TraktSyncType.Episode);
                traktUserWatchingItem.Episode.Should().BeNull();
                traktUserWatchingItem.Show.Should().BeNull();
                traktUserWatchingItem.Movie.Should().BeNull();
            }
        }
        public async Task Test_SyncPlaybackProgressItemObjectJsonReader_Episode_ReadObject_From_Stream_Incomplete_10()
        {
            var jsonReader = new SyncPlaybackProgressItemObjectJsonReader();

            using (var stream = TYPE_EPISODE_JSON_INCOMPLETE_10.ToStream())
            {
                var traktPlaybackProgressItem = await jsonReader.ReadObjectAsync(stream);

                traktPlaybackProgressItem.Should().NotBeNull();
                traktPlaybackProgressItem.Id.Should().Be(0U);
                traktPlaybackProgressItem.Progress.Should().BeNull();
                traktPlaybackProgressItem.PausedAt.Should().BeNull();
                traktPlaybackProgressItem.Type.Should().Be(TraktSyncType.Episode);
                traktPlaybackProgressItem.Episode.Should().BeNull();
                traktPlaybackProgressItem.Show.Should().BeNull();

                traktPlaybackProgressItem.Movie.Should().BeNull();
            }
        }
Example #4
0
        public async Task Test_HistoryItemObjectJsonReader_Episode_ReadObject_From_Stream_Incomplete_10()
        {
            var jsonReader = new HistoryItemObjectJsonReader();

            using (var stream = TYPE_EPISODE_JSON_INCOMPLETE_10.ToStream())
            {
                var traktHistoryItem = await jsonReader.ReadObjectAsync(stream);

                traktHistoryItem.Should().NotBeNull();
                traktHistoryItem.Id.Should().Be(0UL);
                traktHistoryItem.WatchedAt.Should().BeNull();
                traktHistoryItem.Action.Should().BeNull();
                traktHistoryItem.Type.Should().Be(TraktSyncItemType.Episode);
                traktHistoryItem.Episode.Should().BeNull();
                traktHistoryItem.Show.Should().BeNull();

                traktHistoryItem.Movie.Should().BeNull();
                traktHistoryItem.Season.Should().BeNull();
            }
        }