public void Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_JsonReader_Null()
        {
            var traktJsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();
            Func <Task <ITraktPostResponseNotFoundEpisode> > postResponseNotFoundEpisode = () => traktJsonReader.ReadObjectAsync(default(JsonTextReader));

            postResponseNotFoundEpisode.Should().Throw <ArgumentNullException>();
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_JsonReader_Null()
        {
            var traktJsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            var postResponseNotFoundEpisode = await traktJsonReader.ReadObjectAsync(default(JsonTextReader));

            postResponseNotFoundEpisode.Should().BeNull();
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_Stream_Null()
        {
            var jsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            var postResponseNotFoundEpisode = await jsonReader.ReadObjectAsync(default(Stream));

            postResponseNotFoundEpisode.Should().BeNull();
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_Json_String_Empty()
        {
            var jsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            var postResponseNotFoundEpisode = await jsonReader.ReadObjectAsync(string.Empty);

            postResponseNotFoundEpisode.Should().BeNull();
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_Json_String_Not_Valid()
        {
            var jsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            var postResponseNotFoundEpisode = await jsonReader.ReadObjectAsync(JSON_NOT_VALID);

            postResponseNotFoundEpisode.Should().NotBeNull();
            postResponseNotFoundEpisode.Ids.Should().BeNull();
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_Stream_Empty()
        {
            var jsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            using (var stream = string.Empty.ToStream())
            {
                var postResponseNotFoundEpisode = await jsonReader.ReadObjectAsync(stream);

                postResponseNotFoundEpisode.Should().BeNull();
            }
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_JsonReader_Empty()
        {
            var traktJsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            using (var reader = new StringReader(string.Empty))
                using (var jsonReader = new JsonTextReader(reader))
                {
                    var postResponseNotFoundEpisode = await traktJsonReader.ReadObjectAsync(jsonReader);

                    postResponseNotFoundEpisode.Should().BeNull();
                }
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_Stream_Not_Valid()
        {
            var jsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            using (var stream = JSON_NOT_VALID.ToStream())
            {
                var postResponseNotFoundEpisode = await jsonReader.ReadObjectAsync(stream);

                postResponseNotFoundEpisode.Should().NotBeNull();
                postResponseNotFoundEpisode.Ids.Should().BeNull();
            }
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_JsonReader_Not_Valid()
        {
            var traktJsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            using (var reader = new StringReader(JSON_NOT_VALID))
                using (var jsonReader = new JsonTextReader(reader))
                {
                    var postResponseNotFoundEpisode = await traktJsonReader.ReadObjectAsync(jsonReader);

                    postResponseNotFoundEpisode.Should().NotBeNull();
                    postResponseNotFoundEpisode.Ids.Should().BeNull();
                }
        }
Example #10
0
        public async Task Test_TraktPostResponseNotFoundEpisode_From_Json()
        {
            var jsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();
            var postResponseNotFoundEpisode = await jsonReader.ReadObjectAsync(JSON) as TraktPostResponseNotFoundEpisode;

            postResponseNotFoundEpisode.Should().NotBeNull();
            postResponseNotFoundEpisode.Ids.Should().NotBeNull();
            postResponseNotFoundEpisode.Ids.Trakt.Should().Be(73640U);
            postResponseNotFoundEpisode.Ids.Tvdb.Should().Be(3254641U);
            postResponseNotFoundEpisode.Ids.Imdb.Should().Be("tt1480055");
            postResponseNotFoundEpisode.Ids.Tmdb.Should().Be(63056U);
            postResponseNotFoundEpisode.Ids.TvRage.Should().Be(1065008299U);
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_Stream_Complete()
        {
            var jsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            using (var stream = JSON_COMPLETE.ToStream())
            {
                var postResponseNotFoundEpisode = await jsonReader.ReadObjectAsync(stream);

                postResponseNotFoundEpisode.Should().NotBeNull();
                postResponseNotFoundEpisode.Ids.Should().NotBeNull();
                postResponseNotFoundEpisode.Ids.Trakt.Should().Be(73640U);
                postResponseNotFoundEpisode.Ids.Tvdb.Should().Be(3254641U);
                postResponseNotFoundEpisode.Ids.Imdb.Should().Be("tt1480055");
                postResponseNotFoundEpisode.Ids.Tmdb.Should().Be(63056U);
                postResponseNotFoundEpisode.Ids.TvRage.Should().Be(1065008299U);
            }
        }
        public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_JsonReader_Complete()
        {
            var traktJsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();

            using (var reader = new StringReader(JSON_COMPLETE))
                using (var jsonReader = new JsonTextReader(reader))
                {
                    var postResponseNotFoundEpisode = await traktJsonReader.ReadObjectAsync(jsonReader);

                    postResponseNotFoundEpisode.Should().NotBeNull();
                    postResponseNotFoundEpisode.Ids.Should().NotBeNull();
                    postResponseNotFoundEpisode.Ids.Trakt.Should().Be(73640U);
                    postResponseNotFoundEpisode.Ids.Tvdb.Should().Be(3254641U);
                    postResponseNotFoundEpisode.Ids.Imdb.Should().Be("tt1480055");
                    postResponseNotFoundEpisode.Ids.Tmdb.Should().Be(63056U);
                    postResponseNotFoundEpisode.Ids.TvRage.Should().Be(1065008299U);
                }
        }
 public async Task Test_PostResponseNotFoundEpisodeObjectJsonReader_ReadObject_From_Stream_Null()
 {
     var jsonReader = new PostResponseNotFoundEpisodeObjectJsonReader();
     Func <Task <ITraktPostResponseNotFoundEpisode> > postResponseNotFoundEpisode = () => jsonReader.ReadObjectAsync(default(Stream));
     await postResponseNotFoundEpisode.Should().ThrowAsync <ArgumentNullException>();
 }