Пример #1
0
        public async Task Test_UserCustomListItemsPostResponseGroupObjectJsonReader_ReadObject_From_JsonReader_Incomplete_8()
        {
            var traktJsonReader = new UserCustomListItemsPostResponseGroupObjectJsonReader();

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

                    customListItemsPostResponseGroup.Should().NotBeNull();
                    customListItemsPostResponseGroup.Movies.Should().BeNull();
                    customListItemsPostResponseGroup.Shows.Should().BeNull();
                    customListItemsPostResponseGroup.Seasons.Should().Be(3);
                    customListItemsPostResponseGroup.Episodes.Should().BeNull();
                    customListItemsPostResponseGroup.People.Should().BeNull();
                }
        }
 public async Task Test_UserCustomListItemsPostResponseGroupObjectJsonReader_ReadObject_From_Json_String_Null()
 {
     var jsonReader = new UserCustomListItemsPostResponseGroupObjectJsonReader();
     Func <Task <ITraktUserCustomListItemsPostResponseGroup> > customListItemsPostResponseGroup = () => jsonReader.ReadObjectAsync(default(string));
     await customListItemsPostResponseGroup.Should().ThrowAsync <ArgumentNullException>();
 }
        public void Test_UserCustomListItemsPostResponseGroupObjectJsonReader_ReadObject_From_Stream_Null()
        {
            var jsonReader = new UserCustomListItemsPostResponseGroupObjectJsonReader();
            Func <Task <ITraktUserCustomListItemsPostResponseGroup> > customListItemsPostResponseGroup = () => jsonReader.ReadObjectAsync(default(Stream));

            customListItemsPostResponseGroup.Should().Throw <ArgumentNullException>();
        }