public async Task Test_UserObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var jsonReader = new UserObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var user = await jsonReader.ReadObjectAsync(stream); user.Should().NotBeNull(); user.Username.Should().Be("sean"); user.IsPrivate.Should().BeFalse(); user.Name.Should().Be("Sean Rudford"); user.IsVIP.Should().BeTrue(); user.IsVIP_EP.Should().BeTrue(); user.Ids.Should().NotBeNull(); user.Ids.Slug.Should().Be("sean"); user.JoinedAt.Should().HaveValue().And.Be(DateTime.Parse("2010-09-25T17:49:25.000Z").ToUniversalTime()); user.Location.Should().Be("SF"); user.About.Should().Be("I have all your cassette tapes."); user.Gender.Should().Be("male"); user.Age.Should().BeNull(); user.Images.Should().NotBeNull(); user.Images.Avatar.Should().NotBeNull(); user.Images.Avatar.Full.Should().Be("https://walter-dev.trakt.tv/images/users/000/000/001/avatars/large/0ba3f72910.jpg"); } }
public async Task Test_WatchedShowObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var jsonReader = new WatchedShowObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var traktWatchedShow = await jsonReader.ReadObjectAsync(stream); traktWatchedShow.Should().NotBeNull(); traktWatchedShow.Plays.Should().BeNull(); traktWatchedShow.LastWatchedAt.Should().BeNull(); traktWatchedShow.LastUpdatedAt.Should().BeNull(); traktWatchedShow.ResetAt.Should().BeNull(); traktWatchedShow.Show.Should().NotBeNull(); traktWatchedShow.Show.Title.Should().Be("Game of Thrones"); traktWatchedShow.Show.Year.Should().Be(2011); traktWatchedShow.Show.Ids.Should().NotBeNull(); traktWatchedShow.Show.Ids.Trakt.Should().Be(1390U); traktWatchedShow.Show.Ids.Slug.Should().Be("game-of-thrones"); traktWatchedShow.Show.Ids.Tvdb.Should().Be(121361U); traktWatchedShow.Show.Ids.Imdb.Should().Be("tt0944947"); traktWatchedShow.Show.Ids.Tmdb.Should().Be(1399U); traktWatchedShow.Show.Ids.TvRage.Should().Be(24493U); traktWatchedShow.WatchedSeasons.Should().BeNull(); } }
public async Task Test_EpisodeScrobblePostResponseObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var jsonReader = new EpisodeScrobblePostResponseObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var episodeScrobbleResponse = await jsonReader.ReadObjectAsync(stream); episodeScrobbleResponse.Should().NotBeNull(); episodeScrobbleResponse.Id.Should().Be(0UL); episodeScrobbleResponse.Action.Should().BeNull(); episodeScrobbleResponse.Progress.Should().BeNull(); episodeScrobbleResponse.Sharing.Should().BeNull(); episodeScrobbleResponse.Episode.Should().NotBeNull(); episodeScrobbleResponse.Episode.SeasonNumber.Should().Be(1); episodeScrobbleResponse.Episode.Number.Should().Be(1); episodeScrobbleResponse.Episode.Title.Should().Be("Winter Is Coming"); episodeScrobbleResponse.Episode.Ids.Should().NotBeNull(); episodeScrobbleResponse.Episode.Ids.Trakt.Should().Be(73640U); episodeScrobbleResponse.Episode.Ids.Tvdb.Should().Be(3254641U); episodeScrobbleResponse.Episode.Ids.Imdb.Should().Be("tt1480055"); episodeScrobbleResponse.Episode.Ids.Tmdb.Should().Be(63056U); episodeScrobbleResponse.Episode.Ids.TvRage.Should().Be(1065008299U); episodeScrobbleResponse.Show.Should().BeNull(); } }
public async Task Test_SyncEpisodesLastActivitiesObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var jsonReader = new SyncEpisodesLastActivitiesObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var episodesLastActivities = await jsonReader.ReadObjectAsync(stream); episodesLastActivities.Should().NotBeNull(); episodesLastActivities.WatchedAt.Should().BeNull(); episodesLastActivities.CollectedAt.Should().BeNull(); episodesLastActivities.RatedAt.Should().BeNull(); episodesLastActivities.WatchlistedAt.Should().BeNull(); episodesLastActivities.CommentedAt.Should().Be(DateTime.Parse("2014-11-20T06:51:30.325Z").ToUniversalTime()); episodesLastActivities.PausedAt.Should().BeNull(); } }
public async Task Test_SharingObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var traktJsonReader = new SharingObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var traktSharing = await traktJsonReader.ReadObjectAsync(stream); traktSharing.Should().NotBeNull(); traktSharing.Facebook.Should().BeNull(); traktSharing.Twitter.Should().BeNull(); traktSharing.Google.Should().BeNull(); traktSharing.Tumblr.Should().BeNull(); traktSharing.Medium.Should().BeTrue(); traktSharing.Slack.Should().BeNull(); } }
public async Task Test_UserMoviesStatisticsObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var jsonReader = new UserMoviesStatisticsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var userMoviesStatistics = await jsonReader.ReadObjectAsync(stream); userMoviesStatistics.Should().NotBeNull(); userMoviesStatistics.Plays.Should().BeNull(); userMoviesStatistics.Watched.Should().BeNull(); userMoviesStatistics.Minutes.Should().BeNull(); userMoviesStatistics.Collected.Should().BeNull(); userMoviesStatistics.Ratings.Should().Be(64); userMoviesStatistics.Comments.Should().BeNull(); } }
public async Task Test_MetadataObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var traktJsonReader = new MetadataObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var traktMetadata = await traktJsonReader.ReadObjectAsync(stream); traktMetadata.Should().NotBeNull(); traktMetadata.MediaType.Should().BeNull(); traktMetadata.MediaResolution.Should().BeNull(); traktMetadata.Audio.Should().BeNull(); traktMetadata.AudioChannels.Should().BeNull(); traktMetadata.HDR.Should().Be(TraktMediaHDR.DolbyVision); traktMetadata.ThreeDimensional.Should().BeNull(); } }
public async Task Test_ShowIdsObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var traktJsonReader = new ShowIdsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var traktShowIds = await traktJsonReader.ReadObjectAsync(stream); traktShowIds.Should().NotBeNull(); traktShowIds.Trakt.Should().Be(0); traktShowIds.Slug.Should().BeNull(); traktShowIds.Tvdb.Should().BeNull(); traktShowIds.Imdb.Should().BeNull(); traktShowIds.Tmdb.Should().Be(1399U); traktShowIds.TvRage.Should().BeNull(); } }
public async Task Test_StatisticsObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var traktJsonReader = new StatisticsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var traktStatistics = await traktJsonReader.ReadObjectAsync(stream); traktStatistics.Should().NotBeNull(); traktStatistics.Watchers.Should().BeNull(); traktStatistics.Plays.Should().BeNull(); traktStatistics.Collectors.Should().BeNull(); traktStatistics.CollectedEpisodes.Should().Be(1310350); traktStatistics.Comments.Should().BeNull(); traktStatistics.Lists.Should().BeNull(); traktStatistics.Votes.Should().BeNull(); } }
public async Task Test_AuthorizationObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var objectJsonReader = new AuthorizationObjectJsonReader { CompleteDeserialization = true }; using (var stream = JSON_INCOMPLETE_11.ToStream()) { ITraktAuthorization traktAuthorization = await objectJsonReader.ReadObjectAsync(stream); traktAuthorization.Should().NotBeNull(); traktAuthorization.AccessToken.Should().BeNull(); traktAuthorization.RefreshToken.Should().BeNull(); traktAuthorization.Scope.Should().BeNull(); traktAuthorization.ExpiresInSeconds.Should().Be(7200U); traktAuthorization.TokenType.Should().BeNull(); traktAuthorization.CreatedAtTimestamp.Should().Be(0); traktAuthorization.IgnoreExpiration.Should().BeFalse(); } }
public async Task Test_UserStatisticsObjectJsonReader_ReadObject_From_Stream_Incomplete_11() { var jsonReader = new UserStatisticsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_11.ToStream()) { var userStatistics = await jsonReader.ReadObjectAsync(stream); userStatistics.Should().NotBeNull(); userStatistics.Movies.Should().BeNull(); userStatistics.Shows.Should().BeNull(); userStatistics.Seasons.Should().BeNull(); userStatistics.Episodes.Should().BeNull(); userStatistics.Network.Should().NotBeNull(); userStatistics.Network.Friends.Should().Be(1); userStatistics.Network.Followers.Should().Be(4); userStatistics.Network.Following.Should().Be(11); userStatistics.Ratings.Should().BeNull(); } }