public async Task Test_HistoryItemObjectJsonReader_Season_ReadObject_From_Stream_Incomplete_4()
        {
            var jsonReader = new HistoryItemObjectJsonReader();

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

                traktHistoryItem.Should().NotBeNull();
                traktHistoryItem.Id.Should().Be(1982344UL);
                traktHistoryItem.WatchedAt.Should().Be(DateTime.Parse("2013-05-15T05:54:27.000Z").ToUniversalTime());
                traktHistoryItem.Action.Should().Be(TraktHistoryActionType.Watch);
                traktHistoryItem.Type.Should().BeNull();
                traktHistoryItem.Season.Should().NotBeNull();
                traktHistoryItem.Season.Number.Should().Be(1);
                traktHistoryItem.Season.Ids.Should().NotBeNull();
                traktHistoryItem.Season.Ids.Trakt.Should().Be(61430U);
                traktHistoryItem.Season.Ids.Tvdb.Should().Be(279121U);
                traktHistoryItem.Season.Ids.Tmdb.Should().Be(60523U);
                traktHistoryItem.Season.Ids.TvRage.Should().Be(36939U);

                traktHistoryItem.Movie.Should().BeNull();
                traktHistoryItem.Show.Should().BeNull();
                traktHistoryItem.Episode.Should().BeNull();
            }
        }
Exemplo n.º 2
0
        public async Task Test_UserHiddenItemObjectJsonReader_Season_ReadObject_From_Stream_Incomplete_4()
        {
            var jsonReader = new UserHiddenItemObjectJsonReader();

            using (var stream = TYPE_SEASON_JSON_INCOMPLETE_4.ToStream())
            {
                var traktUserHiddenItem = await jsonReader.ReadObjectAsync(stream);

                traktUserHiddenItem.Should().NotBeNull();
                traktUserHiddenItem.HiddenAt.Should().Be(DateTime.Parse("2014-09-01T09:10:11.000Z").ToUniversalTime());
                traktUserHiddenItem.Type.Should().BeNull();
                traktUserHiddenItem.Season.Should().BeNull();
                traktUserHiddenItem.Movie.Should().BeNull();
                traktUserHiddenItem.Show.Should().BeNull();
            }
        }
        public async Task Test_UserCommentObjectJsonReader_Season_ReadObject_From_Stream_Incomplete_4()
        {
            var jsonReader = new UserCommentObjectJsonReader();

            using (var stream = TYPE_SEASON_JSON_INCOMPLETE_4.ToStream())
            {
                var traktUserComment = await jsonReader.ReadObjectAsync(stream);

                traktUserComment.Should().NotBeNull();
                traktUserComment.Type.Should().Be(TraktObjectType.Season);
                traktUserComment.Comment.Should().BeNull();
                traktUserComment.Season.Should().BeNull();

                traktUserComment.Movie.Should().BeNull();
                traktUserComment.Show.Should().BeNull();
                traktUserComment.Episode.Should().BeNull();
                traktUserComment.List.Should().BeNull();
            }
        }