public void Test_UserIdsObjectJsonReader_ReadObject_From_Json_String_Null() { var jsonReader = new UserIdsObjectJsonReader(); Func <Task <ITraktUserIds> > userIds = () => jsonReader.ReadObjectAsync(default(string)); userIds.Should().Throw <ArgumentNullException>(); }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_JsonReader_Null() { var traktJsonReader = new UserIdsObjectJsonReader(); var userIds = await traktJsonReader.ReadObjectAsync(default(JsonTextReader)); userIds.Should().BeNull(); }
public async Task Test_TraktUserIds_From_Json() { var jsonReader = new UserIdsObjectJsonReader(); var userIds = await jsonReader.ReadObjectAsync(JSON) as TraktUserIds; userIds.Should().NotBeNull(); userIds.Slug.Should().Be("sean"); }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_Stream_Null() { var jsonReader = new UserIdsObjectJsonReader(); var userIds = await jsonReader.ReadObjectAsync(default(Stream)); userIds.Should().BeNull(); }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_Json_String_Empty() { var jsonReader = new UserIdsObjectJsonReader(); var userIds = await jsonReader.ReadObjectAsync(string.Empty); userIds.Should().BeNull(); }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_Json_String_Not_Valid() { var jsonReader = new UserIdsObjectJsonReader(); var userIds = await jsonReader.ReadObjectAsync(JSON_NOT_VALID); userIds.Should().NotBeNull(); userIds.Slug.Should().BeNull(); }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_Json_String_Complete() { var jsonReader = new UserIdsObjectJsonReader(); var userIds = await jsonReader.ReadObjectAsync(JSON_COMPLETE); userIds.Should().NotBeNull(); userIds.Slug.Should().Be("sean"); }
public async Task Test_TraktUserIds_From_Json() { var jsonReader = new UserIdsObjectJsonReader(); var userIds = await jsonReader.ReadObjectAsync(JSON) as TraktUserIds; userIds.Should().NotBeNull(); userIds.Slug.Should().Be("sean"); userIds.UUID.Should().Be("b6589fc6ab0dc82cf12099d1c2d40ab994e8410c"); }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_Json_String_Complete() { var jsonReader = new UserIdsObjectJsonReader(); var userIds = await jsonReader.ReadObjectAsync(JSON_COMPLETE); userIds.Should().NotBeNull(); userIds.Slug.Should().Be("sean"); userIds.UUID.Should().Be("b6589fc6ab0dc82cf12099d1c2d40ab994e8410c"); }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_Stream_Empty() { var jsonReader = new UserIdsObjectJsonReader(); using (var stream = string.Empty.ToStream()) { var userIds = await jsonReader.ReadObjectAsync(stream); userIds.Should().BeNull(); } }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_JsonReader_Empty() { var traktJsonReader = new UserIdsObjectJsonReader(); using (var reader = new StringReader(string.Empty)) using (var jsonReader = new JsonTextReader(reader)) { var userIds = await traktJsonReader.ReadObjectAsync(jsonReader); userIds.Should().BeNull(); } }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_Stream_Not_Valid() { var jsonReader = new UserIdsObjectJsonReader(); using (var stream = JSON_NOT_VALID.ToStream()) { var userIds = await jsonReader.ReadObjectAsync(stream); userIds.Should().NotBeNull(); userIds.Slug.Should().BeNull(); } }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_Stream_Complete() { var jsonReader = new UserIdsObjectJsonReader(); using (var stream = JSON_COMPLETE.ToStream()) { var userIds = await jsonReader.ReadObjectAsync(stream); userIds.Should().NotBeNull(); userIds.Slug.Should().Be("sean"); } }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_JsonReader_Not_Valid() { var traktJsonReader = new UserIdsObjectJsonReader(); using (var reader = new StringReader(JSON_NOT_VALID)) using (var jsonReader = new JsonTextReader(reader)) { var userIds = await traktJsonReader.ReadObjectAsync(jsonReader); userIds.Should().NotBeNull(); userIds.Slug.Should().BeNull(); } }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_JsonReader_Complete() { var traktJsonReader = new UserIdsObjectJsonReader(); using (var reader = new StringReader(JSON_COMPLETE)) using (var jsonReader = new JsonTextReader(reader)) { var userIds = await traktJsonReader.ReadObjectAsync(jsonReader); userIds.Should().NotBeNull(); userIds.Slug.Should().Be("sean"); } }
public async Task Test_UserIdsObjectJsonReader_ReadObject_From_Stream_Null() { var jsonReader = new UserIdsObjectJsonReader(); Func <Task <ITraktUserIds> > userIds = () => jsonReader.ReadObjectAsync(default(Stream)); await userIds.Should().ThrowAsync <ArgumentNullException>(); }