-Refactor ExceptionAssert
This commit is contained in:
@@ -55,8 +55,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
[Test]
|
||||
public void DeserializeUnexpectedEnd()
|
||||
{
|
||||
ExceptionAssert.Throws<JsonSerializationException>("Unexpected end when reading KeyValuePair. Path 'Key', line 1, position 14.",
|
||||
() => JsonConvert.DeserializeObject<KeyValuePair<string, int>>(@"{""Key"": ""123"","));
|
||||
ExceptionAssert.Throws<JsonSerializationException>(() => JsonConvert.DeserializeObject<KeyValuePair<string, int>>(@"{""Key"": ""123"","), "Unexpected end when reading KeyValuePair. Path 'Key', line 1, position 14.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user