public async Task Test_MostPWCShowObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var traktJsonReader = new MostPWCShowObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { var traktMostPWCShow = await traktJsonReader.ReadObjectAsync(stream); traktMostPWCShow.Should().NotBeNull(); traktMostPWCShow.WatcherCount.Should().BeNull(); traktMostPWCShow.PlayCount.Should().BeNull(); traktMostPWCShow.CollectedCount.Should().BeNull(); traktMostPWCShow.CollectorCount.Should().BeNull(); traktMostPWCShow.Show.Should().NotBeNull(); traktMostPWCShow.Show.Title.Should().Be("Game of Thrones"); traktMostPWCShow.Show.Year.Should().Be(2011); traktMostPWCShow.Show.Ids.Should().NotBeNull(); traktMostPWCShow.Show.Ids.Trakt.Should().Be(1390U); traktMostPWCShow.Show.Ids.Slug.Should().Be("game-of-thrones"); traktMostPWCShow.Show.Ids.Tvdb.Should().Be(121361U); traktMostPWCShow.Show.Ids.Imdb.Should().Be("tt0944947"); traktMostPWCShow.Show.Ids.Tmdb.Should().Be(1399U); traktMostPWCShow.Show.Ids.TvRage.Should().Be(24493U); } }
public async Task Test_EpisodeCheckinPostResponseObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var jsonReader = new EpisodeCheckinPostResponseObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { var checkinEpisodeResponse = await jsonReader.ReadObjectAsync(stream); checkinEpisodeResponse.Should().NotBeNull(); checkinEpisodeResponse.Id.Should().Be(0UL); checkinEpisodeResponse.WatchedAt.Should().BeNull(); checkinEpisodeResponse.Sharing.Should().BeNull(); checkinEpisodeResponse.Episode.Should().BeNull(); checkinEpisodeResponse.Show.Should().NotBeNull(); checkinEpisodeResponse.Show.Title.Should().Be("Game of Thrones"); checkinEpisodeResponse.Show.Year.Should().Be(2011); checkinEpisodeResponse.Show.Ids.Should().NotBeNull(); checkinEpisodeResponse.Show.Ids.Trakt.Should().Be(1390U); checkinEpisodeResponse.Show.Ids.Slug.Should().Be("game-of-thrones"); checkinEpisodeResponse.Show.Ids.Tvdb.Should().Be(121361U); checkinEpisodeResponse.Show.Ids.Imdb.Should().Be("tt0944947"); checkinEpisodeResponse.Show.Ids.Tmdb.Should().Be(1399U); checkinEpisodeResponse.Show.Ids.TvRage.Should().Be(24493U); } }
public async Task Test_UserObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var jsonReader = new UserObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.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().BeNull(); user.Age.Should().Be(35); 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_UserStatisticsObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var jsonReader = new UserStatisticsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.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().NotBeNull(); userStatistics.Episodes.Plays.Should().Be(552); userStatistics.Episodes.Watched.Should().Be(534); userStatistics.Episodes.Minutes.Should().Be(17330); userStatistics.Episodes.Collected.Should().Be(117); userStatistics.Episodes.Ratings.Should().Be(64); userStatistics.Episodes.Comments.Should().Be(14); userStatistics.Network.Should().BeNull(); userStatistics.Ratings.Should().BeNull(); } }
public async Task Test_UserCustomListItemsPostResponseGroupObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var jsonReader = new UserCustomListItemsPostResponseGroupObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { var customListItemsPostResponseGroup = await jsonReader.ReadObjectAsync(stream); customListItemsPostResponseGroup.Should().NotBeNull(); customListItemsPostResponseGroup.Movies.Should().BeNull(); customListItemsPostResponseGroup.Shows.Should().BeNull(); customListItemsPostResponseGroup.Seasons.Should().BeNull(); customListItemsPostResponseGroup.Episodes.Should().BeNull(); customListItemsPostResponseGroup.People.Should().Be(5); } }
public async Task Test_AccountSettingsObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var jsonReader = new AccountSettingsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { var userAccountSettings = await jsonReader.ReadObjectAsync(stream); userAccountSettings.Should().NotBeNull(); userAccountSettings.TimeZoneId.Should().BeNull(); userAccountSettings.Time24Hr.Should().BeNull(); userAccountSettings.CoverImage.Should().BeNull(); userAccountSettings.Token.Should().BeNull(); userAccountSettings.DateFormat.Should().NotBeNull().And.Be(TraktDateFormat.DayMonthYear); } }
public async Task Test_MovieReleaseObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var traktJsonReader = new MovieReleaseObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { var traktMovieRelease = await traktJsonReader.ReadObjectAsync(stream); traktMovieRelease.Should().NotBeNull(); traktMovieRelease.CountryCode.Should().BeNull(); traktMovieRelease.Certification.Should().BeNull(); traktMovieRelease.ReleaseDate.Should().BeNull(); traktMovieRelease.ReleaseType.Should().BeNull(); traktMovieRelease.Note.Should().Be("Los Angeles, California"); } }
public async Task Test_DeviceObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var objectJsonReader = new DeviceObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { ITraktDevice traktDevice = await objectJsonReader.ReadObjectAsync(stream); traktDevice.Should().NotBeNull(); traktDevice.DeviceCode.Should().BeNull(); traktDevice.UserCode.Should().BeNull(); traktDevice.VerificationUrl.Should().BeNull(); traktDevice.ExpiresInSeconds.Should().Be(0); traktDevice.IntervalInSeconds.Should().Be(600U); } }
public async Task Test_EpisodeIdsObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var traktJsonReader = new EpisodeIdsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { var traktEpisodeIds = await traktJsonReader.ReadObjectAsync(stream); traktEpisodeIds.Should().NotBeNull(); traktEpisodeIds.Trakt.Should().Be(0); traktEpisodeIds.Tvdb.Should().BeNull(); traktEpisodeIds.Imdb.Should().BeNull(); traktEpisodeIds.Tmdb.Should().BeNull(); traktEpisodeIds.TvRage.Should().Be(1065008299U); } }
public async Task Test_SharingObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var traktJsonReader = new SharingObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { var traktSharing = await traktJsonReader.ReadObjectAsync(stream); traktSharing.Should().NotBeNull(); traktSharing.Twitter.Should().BeNull(); traktSharing.Google.Should().BeNull(); traktSharing.Tumblr.Should().BeNull(); traktSharing.Medium.Should().BeNull(); traktSharing.Slack.Should().BeTrue(); } }
public async Task Test_MetadataObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var traktJsonReader = new MetadataObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.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.ThreeDimensional.Should().BeTrue(); } }
public async Task Test_SyncEpisodesLastActivitiesObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var jsonReader = new SyncEpisodesLastActivitiesObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.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().Be(DateTime.Parse("2014-11-20T06:51:30.321Z").ToUniversalTime()); episodesLastActivities.CommentedAt.Should().BeNull(); episodesLastActivities.PausedAt.Should().BeNull(); } }
public async Task Test_ShowIdsObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var traktJsonReader = new ShowIdsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.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().Be("tt0944947"); traktShowIds.Tmdb.Should().BeNull(); traktShowIds.TvRage.Should().BeNull(); } }
public async Task Test_StatisticsObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var traktJsonReader = new StatisticsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { var traktStatistics = await traktJsonReader.ReadObjectAsync(stream); traktStatistics.Should().NotBeNull(); traktStatistics.Watchers.Should().BeNull(); traktStatistics.Plays.Should().BeNull(); traktStatistics.Collectors.Should().Be(49711); traktStatistics.CollectedEpisodes.Should().BeNull(); traktStatistics.Comments.Should().BeNull(); traktStatistics.Lists.Should().BeNull(); traktStatistics.Votes.Should().BeNull(); } }
public async Task Test_WatchedShowObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var jsonReader = new WatchedShowObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.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().Be(DateTime.Parse("2014-09-01T09:10:11.000Z").ToUniversalTime()); traktWatchedShow.Show.Should().BeNull(); traktWatchedShow.WatchedSeasons.Should().BeNull(); } }
public async Task Test_AuthorizationObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var objectJsonReader = new AuthorizationObjectJsonReader { CompleteDeserialization = true }; using (var stream = JSON_INCOMPLETE_10.ToStream()) { ITraktAuthorization traktAuthorization = await objectJsonReader.ReadObjectAsync(stream); traktAuthorization.Should().NotBeNull(); traktAuthorization.AccessToken.Should().BeNull(); traktAuthorization.RefreshToken.Should().BeNull(); traktAuthorization.Scope.Should().Be(TraktAccessScope.Public); traktAuthorization.ExpiresInSeconds.Should().Be(0); traktAuthorization.TokenType.Should().BeNull(); traktAuthorization.CreatedAtTimestamp.Should().Be(0); traktAuthorization.IgnoreExpiration.Should().BeFalse(); } }
public async Task Test_EpisodeScrobblePostResponseObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var jsonReader = new EpisodeScrobblePostResponseObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.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().NotBeNull(); episodeScrobbleResponse.Sharing.Twitter.Should().BeTrue(); episodeScrobbleResponse.Sharing.Google.Should().BeTrue(); episodeScrobbleResponse.Sharing.Tumblr.Should().BeTrue(); episodeScrobbleResponse.Sharing.Medium.Should().BeTrue(); episodeScrobbleResponse.Sharing.Slack.Should().BeTrue(); episodeScrobbleResponse.Episode.Should().BeNull(); episodeScrobbleResponse.Show.Should().BeNull(); } }
public async Task Test_MovieScrobblePostResponseObjectJsonReader_ReadObject_From_Stream_Incomplete_10() { var jsonReader = new MovieScrobblePostResponseObjectJsonReader(); using (var stream = JSON_INCOMPLETE_10.ToStream()) { var movieScrobbleResponse = await jsonReader.ReadObjectAsync(stream); movieScrobbleResponse.Should().NotBeNull(); movieScrobbleResponse.Id.Should().Be(0UL); movieScrobbleResponse.Action.Should().BeNull(); movieScrobbleResponse.Progress.Should().BeNull(); movieScrobbleResponse.Sharing.Should().BeNull(); movieScrobbleResponse.Movie.Should().NotBeNull(); movieScrobbleResponse.Movie.Title.Should().Be("Star Wars: The Force Awakens"); movieScrobbleResponse.Movie.Year.Should().Be(2015); movieScrobbleResponse.Movie.Ids.Should().NotBeNull(); movieScrobbleResponse.Movie.Ids.Trakt.Should().Be(94024U); movieScrobbleResponse.Movie.Ids.Slug.Should().Be("star-wars-the-force-awakens-2015"); movieScrobbleResponse.Movie.Ids.Imdb.Should().Be("tt2488496"); movieScrobbleResponse.Movie.Ids.Tmdb.Should().Be(140607U); } }