public void Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_JsonReader_Null()
        {
            var traktJsonReader = new PostResponseNotFoundMovieObjectJsonReader();
            Func <Task <ITraktPostResponseNotFoundMovie> > postResponseNotFoundMovie = () => traktJsonReader.ReadObjectAsync(default(JsonTextReader));

            postResponseNotFoundMovie.Should().Throw <ArgumentNullException>();
        }
Exemplo n.º 2
0
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_Json_String_Empty()
        {
            var jsonReader = new PostResponseNotFoundMovieObjectJsonReader();

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

            postResponseNotFoundMovie.Should().BeNull();
        }
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_JsonReader_Null()
        {
            var traktJsonReader = new PostResponseNotFoundMovieObjectJsonReader();

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

            postResponseNotFoundMovie.Should().BeNull();
        }
Exemplo n.º 4
0
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_Stream_Null()
        {
            var jsonReader = new PostResponseNotFoundMovieObjectJsonReader();

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

            postResponseNotFoundMovie.Should().BeNull();
        }
Exemplo n.º 5
0
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_Json_String_Not_Valid()
        {
            var jsonReader = new PostResponseNotFoundMovieObjectJsonReader();

            var postResponseNotFoundMovie = await jsonReader.ReadObjectAsync(JSON_NOT_VALID);

            postResponseNotFoundMovie.Should().NotBeNull();
            postResponseNotFoundMovie.Ids.Should().BeNull();
        }
Exemplo n.º 6
0
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_Stream_Empty()
        {
            var jsonReader = new PostResponseNotFoundMovieObjectJsonReader();

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

                postResponseNotFoundMovie.Should().BeNull();
            }
        }
Exemplo n.º 7
0
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_Stream_Not_Valid()
        {
            var jsonReader = new PostResponseNotFoundMovieObjectJsonReader();

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

                postResponseNotFoundMovie.Should().NotBeNull();
                postResponseNotFoundMovie.Ids.Should().BeNull();
            }
        }
        public async Task Test_TraktPostResponseNotFoundMovie_From_Json()
        {
            var jsonReader = new PostResponseNotFoundMovieObjectJsonReader();
            var postResponseNotFoundMovie = await jsonReader.ReadObjectAsync(JSON) as TraktPostResponseNotFoundMovie;

            postResponseNotFoundMovie.Should().NotBeNull();
            postResponseNotFoundMovie.Ids.Should().NotBeNull();
            postResponseNotFoundMovie.Ids.Trakt.Should().Be(94024U);
            postResponseNotFoundMovie.Ids.Slug.Should().Be("star-wars-the-force-awakens-2015");
            postResponseNotFoundMovie.Ids.Imdb.Should().Be("tt2488496");
            postResponseNotFoundMovie.Ids.Tmdb.Should().Be(140607U);
        }
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_JsonReader_Empty()
        {
            var traktJsonReader = new PostResponseNotFoundMovieObjectJsonReader();

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

                    postResponseNotFoundMovie.Should().BeNull();
                }
        }
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_JsonReader_Not_Valid()
        {
            var traktJsonReader = new PostResponseNotFoundMovieObjectJsonReader();

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

                    postResponseNotFoundMovie.Should().NotBeNull();
                    postResponseNotFoundMovie.Ids.Should().BeNull();
                }
        }
Exemplo n.º 11
0
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_Stream_Complete()
        {
            var jsonReader = new PostResponseNotFoundMovieObjectJsonReader();

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

                postResponseNotFoundMovie.Should().NotBeNull();
                postResponseNotFoundMovie.Ids.Should().NotBeNull();
                postResponseNotFoundMovie.Ids.Trakt.Should().Be(94024U);
                postResponseNotFoundMovie.Ids.Slug.Should().Be("star-wars-the-force-awakens-2015");
                postResponseNotFoundMovie.Ids.Imdb.Should().Be("tt2488496");
                postResponseNotFoundMovie.Ids.Tmdb.Should().Be(140607U);
            }
        }
        public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_JsonReader_Complete()
        {
            var traktJsonReader = new PostResponseNotFoundMovieObjectJsonReader();

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

                    postResponseNotFoundMovie.Should().NotBeNull();
                    postResponseNotFoundMovie.Ids.Should().NotBeNull();
                    postResponseNotFoundMovie.Ids.Trakt.Should().Be(94024U);
                    postResponseNotFoundMovie.Ids.Slug.Should().Be("star-wars-the-force-awakens-2015");
                    postResponseNotFoundMovie.Ids.Imdb.Should().Be("tt2488496");
                    postResponseNotFoundMovie.Ids.Tmdb.Should().Be(140607U);
                }
        }
Exemplo n.º 13
0
 public async Task Test_PostResponseNotFoundMovieObjectJsonReader_ReadObject_From_Stream_Null()
 {
     var jsonReader = new PostResponseNotFoundMovieObjectJsonReader();
     Func <Task <ITraktPostResponseNotFoundMovie> > postResponseNotFoundMovie = () => jsonReader.ReadObjectAsync(default(Stream));
     await postResponseNotFoundMovie.Should().ThrowAsync <ArgumentNullException>();
 }