public async Task Test_ListItemObjectJsonReader_Show_ReadObject_From_Stream_Incomplete_3() { var jsonReader = new ListItemObjectJsonReader(); using (var stream = TYPE_SHOW_JSON_INCOMPLETE_3.ToStream()) { var traktListItem = await jsonReader.ReadObjectAsync(stream); traktListItem.Should().NotBeNull(); traktListItem.Rank.Should().Be("1"); traktListItem.ListedAt.Should().Be(DateTime.Parse("2014-09-01T09:10:11.000Z").ToUniversalTime()); traktListItem.Type.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.Episode.Should().BeNull(); traktListItem.Person.Should().BeNull(); } }
public async Task Test_HistoryItemObjectJsonReader_Show_ReadObject_From_Stream_Incomplete_3() { var jsonReader = new HistoryItemObjectJsonReader(); using (var stream = TYPE_SHOW_JSON_INCOMPLETE_3.ToStream()) { var traktHistoryItem = await jsonReader.ReadObjectAsync(stream); traktHistoryItem.Should().NotBeNull(); traktHistoryItem.Id.Should().Be(1982348UL); traktHistoryItem.WatchedAt.Should().Be(DateTime.Parse("2013-06-15T05:54:27.000Z").ToUniversalTime()); traktHistoryItem.Action.Should().BeNull(); traktHistoryItem.Type.Should().Be(TraktSyncItemType.Show); traktHistoryItem.Show.Should().NotBeNull(); traktHistoryItem.Show.Title.Should().Be("Game of Thrones"); traktHistoryItem.Show.Year.Should().Be(2011); traktHistoryItem.Show.Ids.Should().NotBeNull(); traktHistoryItem.Show.Ids.Trakt.Should().Be(1390U); traktHistoryItem.Show.Ids.Slug.Should().Be("game-of-thrones"); traktHistoryItem.Show.Ids.Tvdb.Should().Be(121361U); traktHistoryItem.Show.Ids.Imdb.Should().Be("tt0944947"); traktHistoryItem.Show.Ids.Tmdb.Should().Be(1399U); traktHistoryItem.Show.Ids.TvRage.Should().Be(24493U); traktHistoryItem.Movie.Should().BeNull(); traktHistoryItem.Season.Should().BeNull(); traktHistoryItem.Episode.Should().BeNull(); } }
public async Task Test_UserHiddenItemObjectJsonReader_Show_ReadObject_From_Stream_Incomplete_3() { var jsonReader = new UserHiddenItemObjectJsonReader(); using (var stream = TYPE_SHOW_JSON_INCOMPLETE_3.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().Be(TraktHiddenItemType.Show); traktUserHiddenItem.Show.Should().BeNull(); traktUserHiddenItem.Movie.Should().BeNull(); traktUserHiddenItem.Season.Should().BeNull(); } }
public async Task Test_SearchResultObjectJsonReader_Show_ReadObject_From_Stream_Incomplete_3() { var jsonReader = new SearchResultObjectJsonReader(); using (var stream = TYPE_SHOW_JSON_INCOMPLETE_3.ToStream()) { var traktSearchResultItem = await jsonReader.ReadObjectAsync(stream); traktSearchResultItem.Should().NotBeNull(); traktSearchResultItem.Type.Should().Be(TraktSearchResultType.Show); traktSearchResultItem.Score.Should().Be(46.29501f); traktSearchResultItem.Show.Should().BeNull(); traktSearchResultItem.Movie.Should().BeNull(); traktSearchResultItem.Episode.Should().BeNull(); traktSearchResultItem.Person.Should().BeNull(); traktSearchResultItem.List.Should().BeNull(); } }
public async Task Test_UserCommentObjectJsonReader_Show_ReadObject_From_Stream_Incomplete_3() { var jsonReader = new UserCommentObjectJsonReader(); using (var stream = TYPE_SHOW_JSON_INCOMPLETE_3.ToStream()) { var traktUserComment = await jsonReader.ReadObjectAsync(stream); traktUserComment.Should().NotBeNull(); traktUserComment.Type.Should().Be(TraktObjectType.Show); traktUserComment.Comment.Should().NotBeNull(); traktUserComment.Comment.Id.Should().Be(76957U); traktUserComment.Comment.ParentId.Should().Be(1234U); traktUserComment.Comment.CreatedAt.Should().Be(DateTime.Parse("2016-04-01T12:44:40Z").ToUniversalTime()); traktUserComment.Comment.UpdatedAt.Should().Be(DateTime.Parse("2016-04-03T08:23:38Z").ToUniversalTime()); traktUserComment.Comment.Comment.Should().Be("I hate they made The flash a kids show. Could else be much better. And with a better flash offcourse."); traktUserComment.Comment.Spoiler.Should().BeFalse(); traktUserComment.Comment.Review.Should().BeFalse(); traktUserComment.Comment.Replies.Should().Be(1); traktUserComment.Comment.Likes.Should().Be(2); traktUserComment.Comment.UserRating.Should().Be(7.3f); traktUserComment.Comment.User.Should().NotBeNull(); traktUserComment.Comment.User.Username.Should().Be("sean"); traktUserComment.Comment.User.IsPrivate.Should().BeFalse(); traktUserComment.Comment.User.Name.Should().Be("Sean Rudford"); traktUserComment.Comment.User.IsVIP.Should().BeTrue(); traktUserComment.Comment.User.IsVIP_EP.Should().BeTrue(); traktUserComment.Comment.User.Ids.Should().NotBeNull(); traktUserComment.Comment.User.Ids.Slug.Should().Be("sean"); traktUserComment.Show.Should().BeNull(); traktUserComment.Movie.Should().BeNull(); traktUserComment.Season.Should().BeNull(); traktUserComment.Episode.Should().BeNull(); traktUserComment.List.Should().BeNull(); } }