public void Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_Json_String_Null() { var jsonReader = new UserEpisodesStatisticsObjectJsonReader(); Func <Task <ITraktUserEpisodesStatistics> > userEpisodesStatistics = () => jsonReader.ReadObjectAsync(default(string)); userEpisodesStatistics.Should().Throw <ArgumentNullException>(); }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_Json_String_Empty() { var jsonReader = new UserEpisodesStatisticsObjectJsonReader(); var userEpisodesStatistics = await jsonReader.ReadObjectAsync(string.Empty); userEpisodesStatistics.Should().BeNull(); }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_JsonReader_Null() { var traktJsonReader = new UserEpisodesStatisticsObjectJsonReader(); var userEpisodesStatistics = await traktJsonReader.ReadObjectAsync(default(JsonTextReader)); userEpisodesStatistics.Should().BeNull(); }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_Stream_Null() { var jsonReader = new UserEpisodesStatisticsObjectJsonReader(); var userEpisodesStatistics = await jsonReader.ReadObjectAsync(default(Stream)); userEpisodesStatistics.Should().BeNull(); }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_Stream_Empty() { var jsonReader = new UserEpisodesStatisticsObjectJsonReader(); using (var stream = string.Empty.ToStream()) { var userEpisodesStatistics = await jsonReader.ReadObjectAsync(stream); userEpisodesStatistics.Should().BeNull(); } }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_JsonReader_Empty() { var traktJsonReader = new UserEpisodesStatisticsObjectJsonReader(); using (var reader = new StringReader(string.Empty)) using (var jsonReader = new JsonTextReader(reader)) { var userEpisodesStatistics = await traktJsonReader.ReadObjectAsync(jsonReader); userEpisodesStatistics.Should().BeNull(); } }
public async Task Test_TraktUserEpisodesStatistics_From_Json() { var jsonReader = new UserEpisodesStatisticsObjectJsonReader(); var userEpisodesStatistics = await jsonReader.ReadObjectAsync(JSON) as TraktUserEpisodesStatistics; userEpisodesStatistics.Should().NotBeNull(); userEpisodesStatistics.Plays.Should().Be(552); userEpisodesStatistics.Watched.Should().Be(534); userEpisodesStatistics.Minutes.Should().Be(17330); userEpisodesStatistics.Collected.Should().Be(117); userEpisodesStatistics.Ratings.Should().Be(64); userEpisodesStatistics.Comments.Should().Be(14); }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_Json_String_Incomplete_5() { var jsonReader = new UserEpisodesStatisticsObjectJsonReader(); var userEpisodesStatistics = await jsonReader.ReadObjectAsync(JSON_INCOMPLETE_5); userEpisodesStatistics.Should().NotBeNull(); userEpisodesStatistics.Plays.Should().Be(552); userEpisodesStatistics.Watched.Should().Be(534); userEpisodesStatistics.Minutes.Should().Be(17330); userEpisodesStatistics.Collected.Should().Be(117); userEpisodesStatistics.Ratings.Should().BeNull(); userEpisodesStatistics.Comments.Should().Be(14); }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_Json_String_Not_Valid_7() { var jsonReader = new UserEpisodesStatisticsObjectJsonReader(); var userEpisodesStatistics = await jsonReader.ReadObjectAsync(JSON_NOT_VALID_7); userEpisodesStatistics.Should().NotBeNull(); userEpisodesStatistics.Plays.Should().BeNull(); userEpisodesStatistics.Watched.Should().BeNull(); userEpisodesStatistics.Minutes.Should().BeNull(); userEpisodesStatistics.Collected.Should().BeNull(); userEpisodesStatistics.Ratings.Should().BeNull(); userEpisodesStatistics.Comments.Should().BeNull(); }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_Stream_Incomplete_4() { var jsonReader = new UserEpisodesStatisticsObjectJsonReader(); using (var stream = JSON_INCOMPLETE_4.ToStream()) { var userEpisodesStatistics = await jsonReader.ReadObjectAsync(stream); userEpisodesStatistics.Should().NotBeNull(); userEpisodesStatistics.Plays.Should().Be(552); userEpisodesStatistics.Watched.Should().Be(534); userEpisodesStatistics.Minutes.Should().Be(17330); userEpisodesStatistics.Collected.Should().BeNull(); userEpisodesStatistics.Ratings.Should().Be(64); userEpisodesStatistics.Comments.Should().Be(14); } }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_Stream_Not_Valid_6() { var jsonReader = new UserEpisodesStatisticsObjectJsonReader(); using (var stream = JSON_NOT_VALID_6.ToStream()) { var userEpisodesStatistics = await jsonReader.ReadObjectAsync(stream); userEpisodesStatistics.Should().NotBeNull(); userEpisodesStatistics.Plays.Should().Be(552); userEpisodesStatistics.Watched.Should().Be(534); userEpisodesStatistics.Minutes.Should().Be(17330); userEpisodesStatistics.Collected.Should().Be(117); userEpisodesStatistics.Ratings.Should().Be(64); userEpisodesStatistics.Comments.Should().BeNull(); } }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_JsonReader_Incomplete_4() { var traktJsonReader = new UserEpisodesStatisticsObjectJsonReader(); using (var reader = new StringReader(JSON_INCOMPLETE_4)) using (var jsonReader = new JsonTextReader(reader)) { var userEpisodesStatistics = await traktJsonReader.ReadObjectAsync(jsonReader); userEpisodesStatistics.Should().NotBeNull(); userEpisodesStatistics.Plays.Should().Be(552); userEpisodesStatistics.Watched.Should().Be(534); userEpisodesStatistics.Minutes.Should().Be(17330); userEpisodesStatistics.Collected.Should().BeNull(); userEpisodesStatistics.Ratings.Should().Be(64); userEpisodesStatistics.Comments.Should().Be(14); } }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_JsonReader_Not_Valid_7() { var traktJsonReader = new UserEpisodesStatisticsObjectJsonReader(); using (var reader = new StringReader(JSON_NOT_VALID_7)) using (var jsonReader = new JsonTextReader(reader)) { var userEpisodesStatistics = await traktJsonReader.ReadObjectAsync(jsonReader); userEpisodesStatistics.Should().NotBeNull(); userEpisodesStatistics.Plays.Should().BeNull(); userEpisodesStatistics.Watched.Should().BeNull(); userEpisodesStatistics.Minutes.Should().BeNull(); userEpisodesStatistics.Collected.Should().BeNull(); userEpisodesStatistics.Ratings.Should().BeNull(); userEpisodesStatistics.Comments.Should().BeNull(); } }
public async Task Test_UserEpisodesStatisticsObjectJsonReader_ReadObject_From_JsonReader_Null() { var traktJsonReader = new UserEpisodesStatisticsObjectJsonReader(); Func <Task <ITraktUserEpisodesStatistics> > userEpisodesStatistics = () => traktJsonReader.ReadObjectAsync(default(JsonTextReader)); await userEpisodesStatistics.Should().ThrowAsync <ArgumentNullException>(); }