-Fixed unhelpful error when failing conversion in JsonReader.ReadAsInt32
This commit is contained in:
@@ -56,6 +56,16 @@ namespace Newtonsoft.Json.Tests.JsonTextReaderTests
|
||||
#endif
|
||||
public class ReadAsyncTests : TestFixtureBase
|
||||
{
|
||||
[Test]
|
||||
public async Task ReadAsInt32Async_IntegerTooLarge_ThrowsJsonReaderException()
|
||||
{
|
||||
JValue token = new JValue(long.MaxValue);
|
||||
|
||||
await ExceptionAssert.ThrowsAsync<JsonReaderException>(
|
||||
() => token.CreateReader().ReadAsInt32Async()
|
||||
);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ReadMissingInt64()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user