예제 #1
0
        public async Task Test_EpisodeCollectionProgressArrayJsonReader_ReadArray_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new ArrayJsonReader <ITraktEpisodeCollectionProgress>();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktEpisodeCollectionProgresses = await traktJsonReader.ReadArrayAsync(stream);

                traktEpisodeCollectionProgresses.Should().NotBeNull().And.NotBeEmpty().And.HaveCount(3);

                var collectionProgress = traktEpisodeCollectionProgresses.ToArray();

                collectionProgress[0].Number.Should().Be(1);
                collectionProgress[0].Completed.Should().BeTrue();
                collectionProgress[0].CollectedAt.Should().Be(DateTime.Parse("2011-04-18T01:00:00.000Z").ToUniversalTime());

                collectionProgress[1].Number.Should().Be(2);
                collectionProgress[1].Completed.Should().BeTrue();
                collectionProgress[1].CollectedAt.Should().Be(DateTime.Parse("2011-04-18T01:00:00.000Z").ToUniversalTime());

                collectionProgress[2].Number.Should().BeNull();
                collectionProgress[2].Completed.Should().BeNull();
                collectionProgress[2].CollectedAt.Should().Be(DateTime.Parse("2011-04-18T01:00:00.000Z").ToUniversalTime());
            }
        }
예제 #2
0
        public async Task Test_EpisodeTranslationArrayJsonReader_ReadArray_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new ArrayJsonReader <ITraktEpisodeTranslation>();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktEpisodeTranslations = await traktJsonReader.ReadArrayAsync(stream);

                traktEpisodeTranslations.Should().NotBeNull().And.NotBeEmpty().And.HaveCount(3);

                var translations = traktEpisodeTranslations.ToArray();

                translations[0].Title.Should().Be("Translation 1");
                translations[0].Overview.Should().Be("Translation Overview 1");
                translations[0].LanguageCode.Should().Be("Translation Language 1");

                translations[1].Title.Should().Be("Translation 2");
                translations[1].Overview.Should().Be("Translation Overview 2");
                translations[1].LanguageCode.Should().Be("Translation Language 2");

                translations[2].Title.Should().BeNull();
                translations[2].Overview.Should().BeNull();
                translations[2].LanguageCode.Should().Be("Translation Language 3");
            }
        }
        public async Task Test_WatchedShowEpisodeArrayJsonReader_ReadArray_From_Stream_Incomplete_6()
        {
            var jsonReader = new ArrayJsonReader <ITraktWatchedShowEpisode>();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktWatchedShowEpisodes = await jsonReader.ReadArrayAsync(stream);

                traktWatchedShowEpisodes.Should().NotBeNull().And.NotBeEmpty().And.HaveCount(3);

                var watchedShowEpisodes = traktWatchedShowEpisodes.ToArray();

                watchedShowEpisodes[0].Should().NotBeNull();
                watchedShowEpisodes[0].Number.Should().Be(1);
                watchedShowEpisodes[0].Plays.Should().Be(1);
                watchedShowEpisodes[0].LastWatchedAt.Should().Be(DateTime.Parse("2014-10-12T17:00:54.000Z").ToUniversalTime());

                watchedShowEpisodes[1].Should().NotBeNull();
                watchedShowEpisodes[1].Number.Should().Be(2);
                watchedShowEpisodes[1].Plays.Should().Be(1);
                watchedShowEpisodes[1].LastWatchedAt.Should().Be(DateTime.Parse("2014-10-12T17:00:54.000Z").ToUniversalTime());

                watchedShowEpisodes[2].Should().NotBeNull();
                watchedShowEpisodes[2].Number.Should().BeNull();
                watchedShowEpisodes[2].Plays.Should().BeNull();
                watchedShowEpisodes[2].LastWatchedAt.Should().Be(DateTime.Parse("2014-10-12T17:00:54.000Z").ToUniversalTime());
            }
        }
예제 #4
0
        public async Task Test_WatchedShowObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new WatchedShowObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktWatchedShow = await jsonReader.ReadObjectAsync(stream);

                traktWatchedShow.Should().NotBeNull();
                traktWatchedShow.Plays.Should().Be(1);
                traktWatchedShow.LastWatchedAt.Should().Be(DateTime.Parse("2014-09-01T09:10:11.000Z").ToUniversalTime());
                traktWatchedShow.LastUpdatedAt.Should().Be(DateTime.Parse("2014-09-01T09:10:11.000Z").ToUniversalTime());
                traktWatchedShow.ResetAt.Should().Be(DateTime.Parse("2014-09-01T09:10:11.000Z").ToUniversalTime());

                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_6()
        {
            var jsonReader = new EpisodeScrobblePostResponseObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var episodeScrobbleResponse = await jsonReader.ReadObjectAsync(stream);

                episodeScrobbleResponse.Should().NotBeNull();
                episodeScrobbleResponse.Id.Should().Be(3373536623UL);
                episodeScrobbleResponse.Action.Should().Be(TraktScrobbleActionType.Stop);
                episodeScrobbleResponse.Progress.Should().Be(85.9f);
                episodeScrobbleResponse.Sharing.Should().NotBeNull();
                episodeScrobbleResponse.Sharing.Facebook.Should().BeTrue();
                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().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();
            }
        }
예제 #6
0
        public async Task Test_UserFollowRequestObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new UserFollowRequestObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var userFollowRequest = await jsonReader.ReadObjectAsync(stream);

                userFollowRequest.Should().NotBeNull();
                userFollowRequest.Id.Should().Be(0U);
                userFollowRequest.RequestedAt.Should().BeNull();

                userFollowRequest.User.Should().NotBeNull();
                userFollowRequest.User.Username.Should().Be("sean");
                userFollowRequest.User.IsPrivate.Should().BeFalse();
                userFollowRequest.User.Name.Should().Be("Sean Rudford");
                userFollowRequest.User.IsVIP.Should().BeTrue();
                userFollowRequest.User.IsVIP_EP.Should().BeTrue();
                userFollowRequest.User.Ids.Should().NotBeNull();
                userFollowRequest.User.Ids.Slug.Should().Be("sean");
                userFollowRequest.User.JoinedAt.Should().HaveValue().And.Be(DateTime.Parse("2010-09-25T17:49:25.000Z").ToUniversalTime());
                userFollowRequest.User.Location.Should().Be("SF");
                userFollowRequest.User.About.Should().Be("I have all your cassette tapes.");
                userFollowRequest.User.Gender.Should().Be("male");
                userFollowRequest.User.Age.Should().Be(35);
                userFollowRequest.User.Images.Should().NotBeNull();
                userFollowRequest.User.Images.Avatar.Should().NotBeNull();
                userFollowRequest.User.Images.Avatar.Full.Should().Be("https://walter-dev.trakt.tv/images/users/000/000/001/avatars/large/0ba3f72910.jpg");
            }
        }
        public async Task Test_SeasonWatchedProgressArrayJsonReader_ReadArray_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new ArrayJsonReader <ITraktSeasonWatchedProgress>();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktSeasonWatchedProgresses = await traktJsonReader.ReadArrayAsync(stream);

                traktSeasonWatchedProgresses.Should().NotBeNull().And.NotBeEmpty().And.HaveCount(3);

                var watchedProgresses = traktSeasonWatchedProgresses.ToArray();

                watchedProgresses[0].Number.Should().Be(1);
                watchedProgresses[0].Aired.Should().Be(3);
                watchedProgresses[0].Completed.Should().Be(2);
                watchedProgresses[0].Episodes.Should().NotBeNull().And.HaveCount(2);

                var episodesWatchedProgress = watchedProgresses[0].Episodes.ToArray();

                episodesWatchedProgress[0].Should().NotBeNull();
                episodesWatchedProgress[0].Number.Should().Be(1);
                episodesWatchedProgress[0].Completed.Should().BeTrue();
                episodesWatchedProgress[0].LastWatchedAt.Should().Be(DateTime.Parse("2011-04-18T01:00:00.000Z").ToUniversalTime());

                episodesWatchedProgress[1].Should().NotBeNull();
                episodesWatchedProgress[1].Number.Should().Be(2);
                episodesWatchedProgress[1].Completed.Should().BeTrue();
                episodesWatchedProgress[1].LastWatchedAt.Should().Be(DateTime.Parse("2011-04-19T02:00:00.000Z").ToUniversalTime());

                // -----------------------------------------------

                watchedProgresses[1].Number.Should().BeNull();
                watchedProgresses[1].Aired.Should().Be(3);
                watchedProgresses[1].Completed.Should().BeNull();
                watchedProgresses[1].Episodes.Should().BeNull();

                // -----------------------------------------------

                watchedProgresses[2].Number.Should().Be(3);
                watchedProgresses[2].Aired.Should().Be(3);
                watchedProgresses[2].Completed.Should().Be(2);
                watchedProgresses[2].Episodes.Should().NotBeNull().And.HaveCount(2);

                episodesWatchedProgress = watchedProgresses[2].Episodes.ToArray();

                episodesWatchedProgress[0].Should().NotBeNull();
                episodesWatchedProgress[0].Number.Should().Be(1);
                episodesWatchedProgress[0].Completed.Should().BeTrue();
                episodesWatchedProgress[0].LastWatchedAt.Should().Be(DateTime.Parse("2011-04-18T01:00:00.000Z").ToUniversalTime());

                episodesWatchedProgress[1].Should().NotBeNull();
                episodesWatchedProgress[1].Number.Should().Be(2);
                episodesWatchedProgress[1].Completed.Should().BeTrue();
                episodesWatchedProgress[1].LastWatchedAt.Should().Be(DateTime.Parse("2011-04-19T02:00:00.000Z").ToUniversalTime());
            }
        }
예제 #8
0
        public async Task Test_CertificationObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new CertificationObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktCertification = await traktJsonReader.ReadObjectAsync(stream);

                traktCertification.Should().NotBeNull();
                traktCertification.Name.Should().BeNull();
                traktCertification.Slug.Should().BeNull();
                traktCertification.Description.Should().Be("Parental Guidance Suggested");
            }
        }
예제 #9
0
        public async Task Test_ShowAirsObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new ShowAirsObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktShowAirs = await traktJsonReader.ReadObjectAsync(stream);

                traktShowAirs.Should().NotBeNull();
                traktShowAirs.Day.Should().BeNull();
                traktShowAirs.Time.Should().BeNull();
                traktShowAirs.TimeZoneId.Should().Be("America/New_York");
            }
        }
예제 #10
0
        public async Task Test_EpisodeTranslationObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new EpisodeTranslationObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktEpisodeTranslation = await traktJsonReader.ReadObjectAsync(stream);

                traktEpisodeTranslation.Should().NotBeNull();
                traktEpisodeTranslation.Title.Should().BeNull();
                traktEpisodeTranslation.Overview.Should().BeNull();
                traktEpisodeTranslation.LanguageCode.Should().Be("en");
            }
        }
예제 #11
0
        public async Task Test_EpisodeWatchedProgressObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new EpisodeWatchedProgressObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktEpisodeWatchedProgress = await traktJsonReader.ReadObjectAsync(stream);

                traktEpisodeWatchedProgress.Should().NotBeNull();
                traktEpisodeWatchedProgress.Number.Should().BeNull();
                traktEpisodeWatchedProgress.Completed.Should().BeNull();
                traktEpisodeWatchedProgress.LastWatchedAt.Should().Be(DateTime.Parse("2011-04-18T01:00:00.000Z").ToUniversalTime());
            }
        }
        public async Task Test_SyncListsLastActivitiesObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new SyncListsLastActivitiesObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var listsLastActivities = await jsonReader.ReadObjectAsync(stream);

                listsLastActivities.Should().NotBeNull();
                listsLastActivities.LikedAt.Should().BeNull();
                listsLastActivities.UpdatedAt.Should().BeNull();
                listsLastActivities.CommentedAt.Should().Be(DateTime.Parse("2014-11-20T06:51:30.325Z").ToUniversalTime());
            }
        }
        public async Task Test_WatchedShowEpisodeObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new WatchedShowEpisodeObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktWatchedShowEpisode = await jsonReader.ReadObjectAsync(stream);

                traktWatchedShowEpisode.Should().NotBeNull();
                traktWatchedShowEpisode.Number.Should().BeNull();
                traktWatchedShowEpisode.Plays.Should().BeNull();
                traktWatchedShowEpisode.LastWatchedAt.Should().Be(DateTime.Parse("2014-10-12T17:00:54.000Z").ToUniversalTime());
            }
        }
        public async Task Test_UserNetworkStatisticsObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new UserNetworkStatisticsObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var userNetworkStatistics = await jsonReader.ReadObjectAsync(stream);

                userNetworkStatistics.Should().NotBeNull();
                userNetworkStatistics.Friends.Should().BeNull();
                userNetworkStatistics.Followers.Should().BeNull();
                userNetworkStatistics.Following.Should().Be(11);
            }
        }
        public async Task Test_SyncShowsLastActivitiesObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new SyncShowsLastActivitiesObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var showsLastActivities = await jsonReader.ReadObjectAsync(stream);

                showsLastActivities.Should().NotBeNull();
                showsLastActivities.RatedAt.Should().BeNull();
                showsLastActivities.WatchlistedAt.Should().Be(DateTime.Parse("2014-11-19T22:02:41.308Z").ToUniversalTime());
                showsLastActivities.CommentedAt.Should().BeNull();
                showsLastActivities.HiddenAt.Should().BeNull();
            }
        }
예제 #16
0
        public async Task Test_UserShowsStatisticsObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new UserShowsStatisticsObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var userShowsStatistics = await jsonReader.ReadObjectAsync(stream);

                userShowsStatistics.Should().NotBeNull();
                userShowsStatistics.Watched.Should().BeNull();
                userShowsStatistics.Collected.Should().Be(117);
                userShowsStatistics.Ratings.Should().BeNull();
                userShowsStatistics.Comments.Should().BeNull();
            }
        }
        public async Task Test_SeasonWatchedProgressObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new SeasonWatchedProgressObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktSeasonWatchedProgress = await traktJsonReader.ReadObjectAsync(stream);

                traktSeasonWatchedProgress.Should().NotBeNull();
                traktSeasonWatchedProgress.Number.Should().BeNull();
                traktSeasonWatchedProgress.Aired.Should().Be(3);
                traktSeasonWatchedProgress.Completed.Should().BeNull();
                traktSeasonWatchedProgress.Episodes.Should().BeNull();
            }
        }
        public async Task Test_CollectionMovieObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new CollectionMovieObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktCollectionMovie = await jsonReader.ReadObjectAsync(stream);

                traktCollectionMovie.Should().NotBeNull();
                traktCollectionMovie.CollectedAt.Should().BeNull();
                traktCollectionMovie.UpdatedAt.Should().Be(DateTime.Parse("2014-09-01T09:10:11.000Z").ToUniversalTime());
                traktCollectionMovie.Movie.Should().BeNull();
                traktCollectionMovie.Metadata.Should().BeNull();
            }
        }
        public async Task Test_SeasonIdsObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new SeasonIdsObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktSeasonIds = await traktJsonReader.ReadObjectAsync(stream);

                traktSeasonIds.Should().NotBeNull();
                traktSeasonIds.Trakt.Should().Be(0);
                traktSeasonIds.Tvdb.Should().Be(279121U);
                traktSeasonIds.Tmdb.Should().BeNull();
                traktSeasonIds.TvRage.Should().BeNull();
            }
        }
        public async Task Test_MovieIdsObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new MovieIdsObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktMovieIds = await traktJsonReader.ReadObjectAsync(stream);

                traktMovieIds.Should().NotBeNull();
                traktMovieIds.Trakt.Should().Be(0);
                traktMovieIds.Slug.Should().Be("star-wars-the-force-awakens-2015");
                traktMovieIds.Imdb.Should().BeNull();
                traktMovieIds.Tmdb.Should().BeNull();
            }
        }
예제 #21
0
        public async Task Test_AccountSettingsObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new AccountSettingsObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var userAccountSettings = await jsonReader.ReadObjectAsync(stream);

                userAccountSettings.Should().NotBeNull();
                userAccountSettings.TimeZoneId.Should().BeNull();
                userAccountSettings.Time24Hr.Should().BeTrue();
                userAccountSettings.CoverImage.Should().BeNull();
                userAccountSettings.Token.Should().BeNull();
            }
        }
예제 #22
0
        public async Task Test_MovieTranslationObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new MovieTranslationObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktMovieTranslation = await traktJsonReader.ReadObjectAsync(stream);

                traktMovieTranslation.Should().NotBeNull();
                traktMovieTranslation.Title.Should().BeNull();
                traktMovieTranslation.Overview.Should().Be("A continuation of the saga created by George Lucas, set thirty years after Star Wars: Episode VI – Return of the Jedi.");
                traktMovieTranslation.Tagline.Should().BeNull();
                traktMovieTranslation.LanguageCode.Should().BeNull();
            }
        }
예제 #23
0
        public async Task Test_MostPWCMovieObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new MostPWCMovieObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktMostPWCMovie = await traktJsonReader.ReadObjectAsync(stream);

                traktMostPWCMovie.Should().NotBeNull();
                traktMostPWCMovie.WatcherCount.Should().BeNull();
                traktMostPWCMovie.PlayCount.Should().Be(7100);
                traktMostPWCMovie.CollectedCount.Should().BeNull();
                traktMostPWCMovie.Movie.Should().BeNull();
            }
        }
        public async Task Test_MovieCheckinPostResponseObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new MovieCheckinPostResponseObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var checkinMovieResponse = await jsonReader.ReadObjectAsync(stream);

                checkinMovieResponse.Should().NotBeNull();
                checkinMovieResponse.Id.Should().Be(0UL);
                checkinMovieResponse.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
                checkinMovieResponse.Sharing.Should().BeNull();
                checkinMovieResponse.Movie.Should().BeNull();
            }
        }
        public async Task Test_CollectionShowObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new CollectionShowObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktCollectionShow = await jsonReader.ReadObjectAsync(stream);

                traktCollectionShow.Should().NotBeNull();
                traktCollectionShow.LastCollectedAt.Should().BeNull();
                traktCollectionShow.LastUpdatedAt.Should().Be(DateTime.Parse("2014-07-14T01:00:00.000Z").ToUniversalTime());
                traktCollectionShow.Show.Should().BeNull();
                traktCollectionShow.CollectionSeasons.Should().BeNull();
            }
        }
        public async Task Test_MetadataObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new MetadataObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktMetadata = await traktJsonReader.ReadObjectAsync(stream);

                traktMetadata.Should().NotBeNull();
                traktMetadata.MediaType.Should().Be(TraktMediaType.Digital);
                traktMetadata.MediaResolution.Should().BeNull();
                traktMetadata.Audio.Should().BeNull();
                traktMetadata.AudioChannels.Should().BeNull();
                traktMetadata.ThreeDimensional.Should().BeNull();
            }
        }
        public async Task Test_EpisodeCheckinPostResponseObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new EpisodeCheckinPostResponseObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var checkinEpisodeResponse = await jsonReader.ReadObjectAsync(stream);

                checkinEpisodeResponse.Should().NotBeNull();
                checkinEpisodeResponse.Id.Should().Be(3373536620UL);
                checkinEpisodeResponse.WatchedAt.Should().BeNull();
                checkinEpisodeResponse.Sharing.Should().BeNull();
                checkinEpisodeResponse.Episode.Should().BeNull();
                checkinEpisodeResponse.Show.Should().BeNull();
            }
        }
예제 #28
0
        public async Task Test_WatchedShowObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var jsonReader = new WatchedShowObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktWatchedShow = await jsonReader.ReadObjectAsync(stream);

                traktWatchedShow.Should().NotBeNull();
                traktWatchedShow.Plays.Should().BeNull();
                traktWatchedShow.LastWatchedAt.Should().Be(DateTime.Parse("2014-09-01T09:10:11.000Z").ToUniversalTime());

                traktWatchedShow.Show.Should().BeNull();
                traktWatchedShow.WatchedSeasons.Should().BeNull();
            }
        }
        public async Task Test_MovieReleaseObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var traktJsonReader = new MovieReleaseObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                var traktMovieRelease = await traktJsonReader.ReadObjectAsync(stream);

                traktMovieRelease.Should().NotBeNull();
                traktMovieRelease.CountryCode.Should().Be("us");
                traktMovieRelease.Certification.Should().BeNull();
                traktMovieRelease.ReleaseDate.Should().BeNull();
                traktMovieRelease.ReleaseType.Should().BeNull();
                traktMovieRelease.Note.Should().BeNull();
            }
        }
예제 #30
0
        public async Task Test_DeviceObjectJsonReader_ReadObject_From_Stream_Incomplete_6()
        {
            var objectJsonReader = new DeviceObjectJsonReader();

            using (var stream = JSON_INCOMPLETE_6.ToStream())
            {
                ITraktDevice traktDevice = await objectJsonReader.ReadObjectAsync(stream);

                traktDevice.Should().NotBeNull();
                traktDevice.DeviceCode.Should().Be("mockDeviceCode");
                traktDevice.UserCode.Should().BeNull();
                traktDevice.VerificationUrl.Should().BeNull();
                traktDevice.ExpiresInSeconds.Should().Be(0);
                traktDevice.IntervalInSeconds.Should().Be(0);
            }
        }