-Tests
-Documentation
This commit is contained in:
@@ -54,6 +54,26 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
[TestFixture]
|
||||
public class LinqToJsonTest : TestFixtureBase
|
||||
{
|
||||
[Test]
|
||||
public void IncompleteContainers()
|
||||
{
|
||||
ExceptionAssert.Throws<JsonReaderException>(
|
||||
() => JArray.Parse("[1,"),
|
||||
"Unexpected end of content while loading JArray. Path '[0]', line 1, position 3.");
|
||||
|
||||
ExceptionAssert.Throws<JsonReaderException>(
|
||||
() => JArray.Parse("[1"),
|
||||
"Unexpected end of content while loading JArray. Path '[0]', line 1, position 2.");
|
||||
|
||||
ExceptionAssert.Throws<JsonReaderException>(
|
||||
() => JObject.Parse("{'key':1,"),
|
||||
"Unexpected end of content while loading JObject. Path 'key', line 1, position 9.");
|
||||
|
||||
ExceptionAssert.Throws<JsonReaderException>(
|
||||
() => JObject.Parse("{'key':1"),
|
||||
"Unexpected end of content while loading JObject. Path 'key', line 1, position 8.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void EmptyJEnumerableCount()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user