public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_Json_String_Incomplete_4() { var jsonReader = new EpisodeCollectionProgressObjectJsonReader(); var traktEpisodeCollectionProgress = await jsonReader.ReadObjectAsync(JSON_INCOMPLETE_4); traktEpisodeCollectionProgress.Should().NotBeNull(); traktEpisodeCollectionProgress.Number.Should().Be(2); traktEpisodeCollectionProgress.Completed.Should().BeNull(); traktEpisodeCollectionProgress.CollectedAt.Should().BeNull(); }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_Json_String_Incomplete_2() { var jsonReader = new EpisodeCollectionProgressObjectJsonReader(); var traktEpisodeCollectionProgress = await jsonReader.ReadObjectAsync(JSON_INCOMPLETE_2); traktEpisodeCollectionProgress.Should().NotBeNull(); traktEpisodeCollectionProgress.Number.Should().Be(2); traktEpisodeCollectionProgress.Completed.Should().BeNull(); traktEpisodeCollectionProgress.CollectedAt.Should().Be(DateTime.Parse("2011-04-18T01:00:00.000Z").ToUniversalTime()); }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_Json_String_Not_Valid_3() { var jsonReader = new EpisodeCollectionProgressObjectJsonReader(); var traktEpisodeCollectionProgress = await jsonReader.ReadObjectAsync(JSON_NOT_VALID_3); traktEpisodeCollectionProgress.Should().NotBeNull(); traktEpisodeCollectionProgress.Number.Should().Be(2); traktEpisodeCollectionProgress.Completed.Should().BeTrue(); traktEpisodeCollectionProgress.CollectedAt.Should().BeNull(); }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_Stream_Empty() { var traktJsonReader = new EpisodeCollectionProgressObjectJsonReader(); using (var stream = string.Empty.ToStream()) { var traktEpisodeCollectionProgress = await traktJsonReader.ReadObjectAsync(stream); traktEpisodeCollectionProgress.Should().BeNull(); } }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_JsonReader_Empty() { var traktJsonReader = new EpisodeCollectionProgressObjectJsonReader(); using (var reader = new StringReader(string.Empty)) using (var jsonReader = new JsonTextReader(reader)) { var traktEpisodeCollectionProgress = await traktJsonReader.ReadObjectAsync(jsonReader); traktEpisodeCollectionProgress.Should().BeNull(); } }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_Stream_Incomplete_5() { var traktJsonReader = new EpisodeCollectionProgressObjectJsonReader(); using (var stream = JSON_INCOMPLETE_5.ToStream()) { var traktEpisodeCollectionProgress = await traktJsonReader.ReadObjectAsync(stream); traktEpisodeCollectionProgress.Should().NotBeNull(); traktEpisodeCollectionProgress.Number.Should().BeNull(); traktEpisodeCollectionProgress.Completed.Should().BeTrue(); traktEpisodeCollectionProgress.CollectedAt.Should().BeNull(); } }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_Stream_Incomplete_1() { var traktJsonReader = new EpisodeCollectionProgressObjectJsonReader(); using (var stream = JSON_INCOMPLETE_1.ToStream()) { var traktEpisodeCollectionProgress = await traktJsonReader.ReadObjectAsync(stream); traktEpisodeCollectionProgress.Should().NotBeNull(); traktEpisodeCollectionProgress.Number.Should().BeNull(); traktEpisodeCollectionProgress.Completed.Should().BeTrue(); traktEpisodeCollectionProgress.CollectedAt.Should().Be(DateTime.Parse("2011-04-18T01:00:00.000Z").ToUniversalTime()); } }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_Stream_Not_Valid_4() { var traktJsonReader = new EpisodeCollectionProgressObjectJsonReader(); using (var stream = JSON_NOT_VALID_4.ToStream()) { var traktEpisodeCollectionProgress = await traktJsonReader.ReadObjectAsync(stream); traktEpisodeCollectionProgress.Should().NotBeNull(); traktEpisodeCollectionProgress.Number.Should().BeNull(); traktEpisodeCollectionProgress.Completed.Should().BeNull(); traktEpisodeCollectionProgress.CollectedAt.Should().BeNull(); } }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_JsonReader_Incomplete_4() { var traktJsonReader = new EpisodeCollectionProgressObjectJsonReader(); using (var reader = new StringReader(JSON_INCOMPLETE_4)) using (var jsonReader = new JsonTextReader(reader)) { var traktEpisodeCollectionProgress = await traktJsonReader.ReadObjectAsync(jsonReader); traktEpisodeCollectionProgress.Should().NotBeNull(); traktEpisodeCollectionProgress.Number.Should().Be(2); traktEpisodeCollectionProgress.Completed.Should().BeNull(); traktEpisodeCollectionProgress.CollectedAt.Should().BeNull(); } }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_JsonReader_Not_Valid_3() { var traktJsonReader = new EpisodeCollectionProgressObjectJsonReader(); using (var reader = new StringReader(JSON_NOT_VALID_3)) using (var jsonReader = new JsonTextReader(reader)) { var traktEpisodeCollectionProgress = await traktJsonReader.ReadObjectAsync(jsonReader); traktEpisodeCollectionProgress.Should().NotBeNull(); traktEpisodeCollectionProgress.Number.Should().Be(2); traktEpisodeCollectionProgress.Completed.Should().BeTrue(); traktEpisodeCollectionProgress.CollectedAt.Should().BeNull(); } }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_JsonReader_Not_Valid_2() { var traktJsonReader = new EpisodeCollectionProgressObjectJsonReader(); using (var reader = new StringReader(JSON_NOT_VALID_2)) using (var jsonReader = new JsonTextReader(reader)) { var traktEpisodeCollectionProgress = await traktJsonReader.ReadObjectAsync(jsonReader); traktEpisodeCollectionProgress.Should().NotBeNull(); traktEpisodeCollectionProgress.Number.Should().Be(2); traktEpisodeCollectionProgress.Completed.Should().BeNull(); traktEpisodeCollectionProgress.CollectedAt.Should().Be(DateTime.Parse("2011-04-18T01:00:00.000Z").ToUniversalTime()); } }
public void Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_Json_String_Null() { var jsonReader = new EpisodeCollectionProgressObjectJsonReader(); Func <Task <ITraktEpisodeCollectionProgress> > traktEpisodeCollectionProgress = () => jsonReader.ReadObjectAsync(default(string)); traktEpisodeCollectionProgress.Should().Throw <ArgumentNullException>(); }
public async Task Test_EpisodeCollectionProgressObjectJsonReader_ReadObject_From_Stream_Null() { var traktJsonReader = new EpisodeCollectionProgressObjectJsonReader(); Func <Task <ITraktEpisodeCollectionProgress> > traktEpisodeCollectionProgress = () => traktJsonReader.ReadObjectAsync(default(Stream)); await traktEpisodeCollectionProgress.Should().ThrowAsync <ArgumentNullException>(); }