public void Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_Stream_Null() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); Func <Task <ITraktUserSeasonsStatistics> > userSeasonsStatistics = () => jsonReader.ReadObjectAsync(default(Stream)); userSeasonsStatistics.Should().Throw <ArgumentNullException>(); }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_Json_String_Empty() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); var userSeasonsStatistics = await jsonReader.ReadObjectAsync(string.Empty); userSeasonsStatistics.Should().BeNull(); }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_JsonReader_Null() { var traktJsonReader = new UserSeasonsStatisticsObjectJsonReader(); var userSeasonsStatistics = await traktJsonReader.ReadObjectAsync(default(JsonTextReader)); userSeasonsStatistics.Should().BeNull(); }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_Stream_Null() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); var userSeasonsStatistics = await jsonReader.ReadObjectAsync(default(Stream)); userSeasonsStatistics.Should().BeNull(); }
public async Task Test_TraktUserSeasonsStatistics_From_Json() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); var userSeasonsStatistics = await jsonReader.ReadObjectAsync(JSON) as TraktUserSeasonsStatistics; userSeasonsStatistics.Should().NotBeNull(); userSeasonsStatistics.Ratings.Should().Be(6); userSeasonsStatistics.Comments.Should().Be(1); }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_Json_String_Not_Valid_3() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); var userSeasonsStatistics = await jsonReader.ReadObjectAsync(JSON_NOT_VALID_3); userSeasonsStatistics.Should().NotBeNull(); userSeasonsStatistics.Ratings.Should().BeNull(); userSeasonsStatistics.Comments.Should().BeNull(); }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_Json_String_Incomplete_2() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); var userSeasonsStatistics = await jsonReader.ReadObjectAsync(JSON_INCOMPLETE_2); userSeasonsStatistics.Should().NotBeNull(); userSeasonsStatistics.Ratings.Should().Be(6); userSeasonsStatistics.Comments.Should().BeNull(); }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_Stream_Empty() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); using (var stream = string.Empty.ToStream()) { var userSeasonsStatistics = await jsonReader.ReadObjectAsync(stream); userSeasonsStatistics.Should().BeNull(); } }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_JsonReader_Empty() { var traktJsonReader = new UserSeasonsStatisticsObjectJsonReader(); using (var reader = new StringReader(string.Empty)) using (var jsonReader = new JsonTextReader(reader)) { var userSeasonsStatistics = await traktJsonReader.ReadObjectAsync(jsonReader); userSeasonsStatistics.Should().BeNull(); } }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_Stream_Not_Valid_3() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); using (var stream = JSON_NOT_VALID_3.ToStream()) { var userSeasonsStatistics = await jsonReader.ReadObjectAsync(stream); userSeasonsStatistics.Should().NotBeNull(); userSeasonsStatistics.Ratings.Should().BeNull(); userSeasonsStatistics.Comments.Should().BeNull(); } }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_Stream_Incomplete_2() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_2.ToStream()) { var userSeasonsStatistics = await jsonReader.ReadObjectAsync(stream); userSeasonsStatistics.Should().NotBeNull(); userSeasonsStatistics.Ratings.Should().Be(6); userSeasonsStatistics.Comments.Should().BeNull(); } }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_JsonReader_Not_Valid_3() { var traktJsonReader = new UserSeasonsStatisticsObjectJsonReader(); using (var reader = new StringReader(JSON_NOT_VALID_3)) using (var jsonReader = new JsonTextReader(reader)) { var userSeasonsStatistics = await traktJsonReader.ReadObjectAsync(jsonReader); userSeasonsStatistics.Should().NotBeNull(); userSeasonsStatistics.Ratings.Should().BeNull(); userSeasonsStatistics.Comments.Should().BeNull(); } }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_JsonReader_Incomplete_2() { var traktJsonReader = new UserSeasonsStatisticsObjectJsonReader(); using (var reader = new StringReader(JSON_INCOMPLETE_2)) using (var jsonReader = new JsonTextReader(reader)) { var userSeasonsStatistics = await traktJsonReader.ReadObjectAsync(jsonReader); userSeasonsStatistics.Should().NotBeNull(); userSeasonsStatistics.Ratings.Should().Be(6); userSeasonsStatistics.Comments.Should().BeNull(); } }
public async Task Test_UserSeasonsStatisticsObjectJsonReader_ReadObject_From_Json_String_Null() { var jsonReader = new UserSeasonsStatisticsObjectJsonReader(); Func <Task <ITraktUserSeasonsStatistics> > userSeasonsStatistics = () => jsonReader.ReadObjectAsync(default(string)); await userSeasonsStatistics.Should().ThrowAsync <ArgumentNullException>(); }