public void Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Stream_Null() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); Func <Task <ITraktCollectionShowEpisode> > traktCollectionShowEpisode = () => jsonReader.ReadObjectAsync(default(Stream)); traktCollectionShowEpisode.Should().Throw <ArgumentNullException>(); }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Json_String_Empty() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(string.Empty); traktCollectionShowEpisode.Should().BeNull(); }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_JsonReader_Null() { var traktJsonReader = new CollectionShowEpisodeObjectJsonReader(); var traktCollectionShowEpisode = await traktJsonReader.ReadObjectAsync(default(JsonTextReader)); traktCollectionShowEpisode.Should().BeNull(); }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Stream_Null() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(default(Stream)); traktCollectionShowEpisode.Should().BeNull(); }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Stream_Empty() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); using (var stream = string.Empty.ToStream()) { var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(stream); traktCollectionShowEpisode.Should().BeNull(); } }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Json_String_Not_Valid_4() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(JSON_NOT_VALID_4); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().BeNull(); traktCollectionShowEpisode.CollectedAt.Should().BeNull(); traktCollectionShowEpisode.Metadata.Should().BeNull(); }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Json_String_Incomplete_5() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(JSON_INCOMPLETE_5); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().BeNull(); traktCollectionShowEpisode.CollectedAt.Should().Be(DateTime.Parse("2014-07-14T01:00:00.000Z").ToUniversalTime()); traktCollectionShowEpisode.Metadata.Should().BeNull(); }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Json_String_Incomplete_4() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(JSON_INCOMPLETE_4); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().Be(1); traktCollectionShowEpisode.CollectedAt.Should().BeNull(); traktCollectionShowEpisode.Metadata.Should().BeNull(); }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_JsonReader_Empty() { var traktJsonReader = new CollectionShowEpisodeObjectJsonReader(); using (var reader = new StringReader(string.Empty)) using (var jsonReader = new JsonTextReader(reader)) { var traktCollectionShowEpisode = await traktJsonReader.ReadObjectAsync(jsonReader); traktCollectionShowEpisode.Should().BeNull(); } }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Stream_Not_Valid_4() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); using (var stream = JSON_NOT_VALID_4.ToStream()) { var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(stream); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().BeNull(); traktCollectionShowEpisode.CollectedAt.Should().BeNull(); traktCollectionShowEpisode.Metadata.Should().BeNull(); } }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Stream_Not_Valid_3() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); using (var stream = JSON_NOT_VALID_3.ToStream()) { var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(stream); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().Be(1); traktCollectionShowEpisode.CollectedAt.Should().Be(DateTime.Parse("2014-07-14T01:00:00.000Z").ToUniversalTime()); traktCollectionShowEpisode.Metadata.Should().BeNull(); } }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_JsonReader_Incomplete_4() { var traktJsonReader = new CollectionShowEpisodeObjectJsonReader(); using (var reader = new StringReader(JSON_INCOMPLETE_4)) using (var jsonReader = new JsonTextReader(reader)) { var traktCollectionShowEpisode = await traktJsonReader.ReadObjectAsync(jsonReader); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().Be(1); traktCollectionShowEpisode.CollectedAt.Should().BeNull(); traktCollectionShowEpisode.Metadata.Should().BeNull(); } }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_JsonReader_Incomplete_3() { var traktJsonReader = new CollectionShowEpisodeObjectJsonReader(); using (var reader = new StringReader(JSON_INCOMPLETE_3)) using (var jsonReader = new JsonTextReader(reader)) { var traktCollectionShowEpisode = await traktJsonReader.ReadObjectAsync(jsonReader); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().Be(1); traktCollectionShowEpisode.CollectedAt.Should().Be(DateTime.Parse("2014-07-14T01:00:00.000Z").ToUniversalTime()); traktCollectionShowEpisode.Metadata.Should().BeNull(); } }
public async Task Test_TraktCollectionShowEpisode_From_Json() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); var collectionShowEpisode = await jsonReader.ReadObjectAsync(JSON) as TraktCollectionShowEpisode; collectionShowEpisode.Should().NotBeNull(); collectionShowEpisode.Number.Should().Be(1); collectionShowEpisode.CollectedAt.Should().Be(DateTime.Parse("2014-07-14T01:00:00.000Z").ToUniversalTime()); collectionShowEpisode.Metadata.Should().NotBeNull(); collectionShowEpisode.Metadata.MediaType.Should().Be(TraktMediaType.Digital); collectionShowEpisode.Metadata.MediaResolution.Should().Be(TraktMediaResolution.HD_720p); collectionShowEpisode.Metadata.Audio.Should().Be(TraktMediaAudio.AAC); collectionShowEpisode.Metadata.AudioChannels.Should().Be(TraktMediaAudioChannel.Channels_5_1); collectionShowEpisode.Metadata.ThreeDimensional.Should().BeTrue(); }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Json_String_Incomplete_2() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(JSON_INCOMPLETE_2); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().Be(1); traktCollectionShowEpisode.CollectedAt.Should().BeNull(); traktCollectionShowEpisode.Metadata.Should().NotBeNull(); traktCollectionShowEpisode.Metadata.MediaType.Should().Be(TraktMediaType.Digital); traktCollectionShowEpisode.Metadata.MediaResolution.Should().Be(TraktMediaResolution.HD_720p); traktCollectionShowEpisode.Metadata.Audio.Should().Be(TraktMediaAudio.AAC); traktCollectionShowEpisode.Metadata.AudioChannels.Should().Be(TraktMediaAudioChannel.Channels_5_1); traktCollectionShowEpisode.Metadata.ThreeDimensional.Should().BeTrue(); }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Stream_Incomplete_1() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); using (var stream = JSON_INCOMPLETE_1.ToStream()) { var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(stream); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().BeNull(); traktCollectionShowEpisode.CollectedAt.Should().Be(DateTime.Parse("2014-07-14T01:00:00.000Z").ToUniversalTime()); traktCollectionShowEpisode.Metadata.Should().NotBeNull(); traktCollectionShowEpisode.Metadata.MediaType.Should().Be(TraktMediaType.Digital); traktCollectionShowEpisode.Metadata.MediaResolution.Should().Be(TraktMediaResolution.HD_720p); traktCollectionShowEpisode.Metadata.Audio.Should().Be(TraktMediaAudio.AAC); traktCollectionShowEpisode.Metadata.AudioChannels.Should().Be(TraktMediaAudioChannel.Channels_5_1); traktCollectionShowEpisode.Metadata.ThreeDimensional.Should().BeTrue(); } }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Stream_Not_Valid_2() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); using (var stream = JSON_NOT_VALID_2.ToStream()) { var traktCollectionShowEpisode = await jsonReader.ReadObjectAsync(stream); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().Be(1); traktCollectionShowEpisode.CollectedAt.Should().BeNull(); traktCollectionShowEpisode.Metadata.Should().NotBeNull(); traktCollectionShowEpisode.Metadata.MediaType.Should().Be(TraktMediaType.Digital); traktCollectionShowEpisode.Metadata.MediaResolution.Should().Be(TraktMediaResolution.HD_720p); traktCollectionShowEpisode.Metadata.Audio.Should().Be(TraktMediaAudio.AAC); traktCollectionShowEpisode.Metadata.AudioChannels.Should().Be(TraktMediaAudioChannel.Channels_5_1); traktCollectionShowEpisode.Metadata.ThreeDimensional.Should().BeTrue(); } }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_JsonReader_Not_Valid_1() { var traktJsonReader = new CollectionShowEpisodeObjectJsonReader(); using (var reader = new StringReader(JSON_NOT_VALID_1)) using (var jsonReader = new JsonTextReader(reader)) { var traktCollectionShowEpisode = await traktJsonReader.ReadObjectAsync(jsonReader); traktCollectionShowEpisode.Should().NotBeNull(); traktCollectionShowEpisode.Number.Should().BeNull(); traktCollectionShowEpisode.CollectedAt.Should().Be(DateTime.Parse("2014-07-14T01:00:00.000Z").ToUniversalTime()); traktCollectionShowEpisode.Metadata.Should().NotBeNull(); traktCollectionShowEpisode.Metadata.MediaType.Should().Be(TraktMediaType.Digital); traktCollectionShowEpisode.Metadata.MediaResolution.Should().Be(TraktMediaResolution.HD_720p); traktCollectionShowEpisode.Metadata.Audio.Should().Be(TraktMediaAudio.AAC); traktCollectionShowEpisode.Metadata.AudioChannels.Should().Be(TraktMediaAudioChannel.Channels_5_1); traktCollectionShowEpisode.Metadata.ThreeDimensional.Should().BeTrue(); } }
public async Task Test_CollectionShowEpisodeObjectJsonReader_ReadObject_From_Json_String_Null() { var jsonReader = new CollectionShowEpisodeObjectJsonReader(); Func <Task <ITraktCollectionShowEpisode> > traktCollectionShowEpisode = () => jsonReader.ReadObjectAsync(default(string)); await traktCollectionShowEpisode.Should().ThrowAsync <ArgumentNullException>(); }