public async Task Test_ListItemObjectJsonReader_Episode_ReadObject_From_Stream_Not_Valid_4() { var jsonReader = new ListItemObjectJsonReader(); using (var stream = TYPE_EPISODE_JSON_NOT_VALID_4.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().Be(TraktListItemType.Episode); 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_SearchResultObjectJsonReader_Episode_ReadObject_From_Stream_Not_Valid_4() { var jsonReader = new SearchResultObjectJsonReader(); using (var stream = TYPE_EPISODE_JSON_NOT_VALID_4.ToStream()) { var traktSearchResultItem = await jsonReader.ReadObjectAsync(stream); traktSearchResultItem.Should().NotBeNull(); traktSearchResultItem.Type.Should().Be(TraktSearchResultType.Episode); traktSearchResultItem.Score.Should().Be(46.29501f); traktSearchResultItem.Episode.Should().NotBeNull(); traktSearchResultItem.Episode.SeasonNumber.Should().Be(1); traktSearchResultItem.Episode.Number.Should().Be(1); traktSearchResultItem.Episode.Title.Should().Be("Winter Is Coming"); traktSearchResultItem.Episode.Ids.Should().NotBeNull(); traktSearchResultItem.Episode.Ids.Trakt.Should().Be(73640U); traktSearchResultItem.Episode.Ids.Tvdb.Should().Be(3254641U); traktSearchResultItem.Episode.Ids.Imdb.Should().Be("tt1480055"); traktSearchResultItem.Episode.Ids.Tmdb.Should().Be(63056U); traktSearchResultItem.Episode.Ids.TvRage.Should().Be(1065008299U); traktSearchResultItem.Show.Should().BeNull(); traktSearchResultItem.Movie.Should().BeNull(); traktSearchResultItem.Person.Should().BeNull(); traktSearchResultItem.List.Should().BeNull(); } }
public async Task Test_WatchlistItemObjectJsonReader_Episode_ReadObject_From_Stream_Not_Valid_4() { var jsonReader = new WatchlistItemObjectJsonReader(); using (var stream = TYPE_EPISODE_JSON_NOT_VALID_4.ToStream()) { var traktWatchlistItem = await jsonReader.ReadObjectAsync(stream); traktWatchlistItem.Should().NotBeNull(); traktWatchlistItem.ListedAt.Should().Be(DateTime.Parse("2014-09-01T09:10:11.000Z").ToUniversalTime()); traktWatchlistItem.Type.Should().Be(TraktSyncItemType.Episode); traktWatchlistItem.Episode.Should().NotBeNull(); traktWatchlistItem.Episode.SeasonNumber.Should().Be(1); traktWatchlistItem.Episode.Number.Should().Be(1); traktWatchlistItem.Episode.Title.Should().Be("Winter Is Coming"); traktWatchlistItem.Episode.Ids.Should().NotBeNull(); traktWatchlistItem.Episode.Ids.Trakt.Should().Be(73640U); traktWatchlistItem.Episode.Ids.Tvdb.Should().Be(3254641U); traktWatchlistItem.Episode.Ids.Imdb.Should().Be("tt1480055"); traktWatchlistItem.Episode.Ids.Tmdb.Should().Be(63056U); traktWatchlistItem.Episode.Ids.TvRage.Should().Be(1065008299U); traktWatchlistItem.Show.Should().BeNull(); traktWatchlistItem.Movie.Should().BeNull(); traktWatchlistItem.Season.Should().BeNull(); } }
public async Task Test_UserCommentObjectJsonReader_Episode_ReadObject_From_Stream_Not_Valid_4() { var jsonReader = new UserCommentObjectJsonReader(); using (var stream = TYPE_EPISODE_JSON_NOT_VALID_4.ToStream()) { var traktUserComment = await jsonReader.ReadObjectAsync(stream); traktUserComment.Should().NotBeNull(); traktUserComment.Type.Should().Be(TraktObjectType.Episode); 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.Episode.Should().NotBeNull(); traktUserComment.Episode.SeasonNumber.Should().Be(1); traktUserComment.Episode.Number.Should().Be(1); traktUserComment.Episode.Title.Should().Be("Winter Is Coming"); traktUserComment.Episode.Ids.Should().NotBeNull(); traktUserComment.Episode.Ids.Trakt.Should().Be(73640U); traktUserComment.Episode.Ids.Tvdb.Should().Be(3254641U); traktUserComment.Episode.Ids.Imdb.Should().Be("tt1480055"); traktUserComment.Episode.Ids.Tmdb.Should().Be(63056U); traktUserComment.Episode.Ids.TvRage.Should().Be(1065008299U); traktUserComment.Show.Should().BeNull(); traktUserComment.Movie.Should().BeNull(); traktUserComment.Season.Should().BeNull(); traktUserComment.List.Should().BeNull(); } }
public async Task Test_SyncPlaybackProgressItemObjectJsonReader_Episode_ReadObject_From_Stream_Not_Valid_4() { var jsonReader = new SyncPlaybackProgressItemObjectJsonReader(); using (var stream = TYPE_EPISODE_JSON_NOT_VALID_4.ToStream()) { var traktPlaybackProgressItem = await jsonReader.ReadObjectAsync(stream); traktPlaybackProgressItem.Should().NotBeNull(); traktPlaybackProgressItem.Id.Should().Be(37U); traktPlaybackProgressItem.Progress.Should().Be(65.5f); traktPlaybackProgressItem.PausedAt.Should().Be(DateTime.Parse("2015-01-25T22:01:32.000Z").ToUniversalTime()); traktPlaybackProgressItem.Type.Should().BeNull(); traktPlaybackProgressItem.Episode.Should().NotBeNull(); traktPlaybackProgressItem.Episode.SeasonNumber.Should().Be(1); traktPlaybackProgressItem.Episode.Number.Should().Be(1); traktPlaybackProgressItem.Episode.Title.Should().Be("Winter Is Coming"); traktPlaybackProgressItem.Episode.Ids.Should().NotBeNull(); traktPlaybackProgressItem.Episode.Ids.Trakt.Should().Be(73640U); traktPlaybackProgressItem.Episode.Ids.Tvdb.Should().Be(3254641U); traktPlaybackProgressItem.Episode.Ids.Imdb.Should().Be("tt1480055"); traktPlaybackProgressItem.Episode.Ids.Tmdb.Should().Be(63056U); traktPlaybackProgressItem.Episode.Ids.TvRage.Should().Be(1065008299U); traktPlaybackProgressItem.Show.Should().NotBeNull(); traktPlaybackProgressItem.Show.Title.Should().Be("Game of Thrones"); traktPlaybackProgressItem.Show.Year.Should().Be(2011); traktPlaybackProgressItem.Show.Ids.Should().NotBeNull(); traktPlaybackProgressItem.Show.Ids.Trakt.Should().Be(1390U); traktPlaybackProgressItem.Show.Ids.Slug.Should().Be("game-of-thrones"); traktPlaybackProgressItem.Show.Ids.Tvdb.Should().Be(121361U); traktPlaybackProgressItem.Show.Ids.Imdb.Should().Be("tt0944947"); traktPlaybackProgressItem.Show.Ids.Tmdb.Should().Be(1399U); traktPlaybackProgressItem.Show.Ids.TvRage.Should().Be(24493U); traktPlaybackProgressItem.Movie.Should().BeNull(); } }
public async Task Test_HistoryItemObjectJsonReader_Episode_ReadObject_From_Stream_Not_Valid_4() { var jsonReader = new HistoryItemObjectJsonReader(); using (var stream = TYPE_EPISODE_JSON_NOT_VALID_4.ToStream()) { var traktHistoryItem = await jsonReader.ReadObjectAsync(stream); traktHistoryItem.Should().NotBeNull(); traktHistoryItem.Id.Should().Be(1982347UL); traktHistoryItem.WatchedAt.Should().Be(DateTime.Parse("2014-02-27T09:28:53.000Z").ToUniversalTime()); traktHistoryItem.Action.Should().Be(TraktHistoryActionType.Checkin); traktHistoryItem.Type.Should().BeNull(); traktHistoryItem.Episode.Should().NotBeNull(); traktHistoryItem.Episode.SeasonNumber.Should().Be(1); traktHistoryItem.Episode.Number.Should().Be(1); traktHistoryItem.Episode.Title.Should().Be("Winter Is Coming"); traktHistoryItem.Episode.Ids.Should().NotBeNull(); traktHistoryItem.Episode.Ids.Trakt.Should().Be(73640U); traktHistoryItem.Episode.Ids.Tvdb.Should().Be(3254641U); traktHistoryItem.Episode.Ids.Imdb.Should().Be("tt1480055"); traktHistoryItem.Episode.Ids.Tmdb.Should().Be(63056U); traktHistoryItem.Episode.Ids.TvRage.Should().Be(1065008299U); 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(); } }