Example #1
0
        public void Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_JsonReader_Null()
        {
            var traktJsonReader = new PostResponseNotFoundSeasonObjectJsonReader();
            Func <Task <ITraktPostResponseNotFoundSeason> > postResponseNotFoundSeason = () => traktJsonReader.ReadObjectAsync(default(JsonTextReader));

            postResponseNotFoundSeason.Should().Throw <ArgumentNullException>();
        }
Example #2
0
        public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_Json_String_Empty()
        {
            var jsonReader = new PostResponseNotFoundSeasonObjectJsonReader();

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

            postResponseNotFoundSeason.Should().BeNull();
        }
Example #3
0
        public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_Stream_Null()
        {
            var jsonReader = new PostResponseNotFoundSeasonObjectJsonReader();

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

            postResponseNotFoundSeason.Should().BeNull();
        }
Example #4
0
        public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_JsonReader_Null()
        {
            var traktJsonReader = new PostResponseNotFoundSeasonObjectJsonReader();

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

            postResponseNotFoundSeason.Should().BeNull();
        }
Example #5
0
        public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_Json_String_Not_Valid()
        {
            var jsonReader = new PostResponseNotFoundSeasonObjectJsonReader();

            var postResponseNotFoundSeason = await jsonReader.ReadObjectAsync(JSON_NOT_VALID);

            postResponseNotFoundSeason.Should().NotBeNull();
            postResponseNotFoundSeason.Ids.Should().BeNull();
        }
        public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_Stream_Empty()
        {
            var jsonReader = new PostResponseNotFoundSeasonObjectJsonReader();

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

                postResponseNotFoundSeason.Should().BeNull();
            }
        }
        public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_JsonReader_Empty()
        {
            var traktJsonReader = new PostResponseNotFoundSeasonObjectJsonReader();

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

                    postResponseNotFoundSeason.Should().BeNull();
                }
        }
        public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_Stream_Not_Valid()
        {
            var jsonReader = new PostResponseNotFoundSeasonObjectJsonReader();

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

                postResponseNotFoundSeason.Should().NotBeNull();
                postResponseNotFoundSeason.Ids.Should().BeNull();
            }
        }
Example #9
0
        public async Task Test_TraktPostResponseNotFoundSeason_From_Json()
        {
            var jsonReader = new PostResponseNotFoundSeasonObjectJsonReader();
            var postResponseNotFoundSeason = await jsonReader.ReadObjectAsync(JSON) as TraktPostResponseNotFoundSeason;

            postResponseNotFoundSeason.Should().NotBeNull();
            postResponseNotFoundSeason.Ids.Should().NotBeNull();
            postResponseNotFoundSeason.Ids.Trakt.Should().Be(61430U);
            postResponseNotFoundSeason.Ids.Tvdb.Should().Be(279121U);
            postResponseNotFoundSeason.Ids.Tmdb.Should().Be(60523U);
            postResponseNotFoundSeason.Ids.TvRage.Should().Be(36939U);
        }
Example #10
0
        public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_Json_String_Complete()
        {
            var jsonReader = new PostResponseNotFoundSeasonObjectJsonReader();

            var postResponseNotFoundSeason = await jsonReader.ReadObjectAsync(JSON_COMPLETE);

            postResponseNotFoundSeason.Should().NotBeNull();
            postResponseNotFoundSeason.Ids.Should().NotBeNull();
            postResponseNotFoundSeason.Ids.Trakt.Should().Be(61430U);
            postResponseNotFoundSeason.Ids.Tvdb.Should().Be(279121U);
            postResponseNotFoundSeason.Ids.Tmdb.Should().Be(60523U);
            postResponseNotFoundSeason.Ids.TvRage.Should().Be(36939U);
        }
        public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_JsonReader_Not_Valid()
        {
            var traktJsonReader = new PostResponseNotFoundSeasonObjectJsonReader();

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

                    postResponseNotFoundSeason.Should().NotBeNull();
                    postResponseNotFoundSeason.Ids.Should().BeNull();
                }
        }
Example #12
0
 public async Task Test_PostResponseNotFoundSeasonObjectJsonReader_ReadObject_From_Json_String_Null()
 {
     var jsonReader = new PostResponseNotFoundSeasonObjectJsonReader();
     Func <Task <ITraktPostResponseNotFoundSeason> > postResponseNotFoundSeason = () => jsonReader.ReadObjectAsync(default(string));
     await postResponseNotFoundSeason.Should().ThrowAsync <ArgumentNullException>();
 }