1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00

tests for improved failure handling

This commit is contained in:
Bence Erős 2016-04-26 23:31:43 +02:00
parent f857dda5d8
commit e748c60eb1
2 changed files with 14 additions and 1 deletions

View file

@ -94,4 +94,14 @@ public class JSONPointerTest {
new JSONPointer("key"); new JSONPointer("key");
} }
@Test(expected = JSONPointerException.class)
public void arrayIndexFailure() {
query("/foo/2");
}
@Test(expected = JSONPointerException.class)
public void primitiveFailure() {
query("/obj/key/failure");
}
} }

View file

@ -12,5 +12,8 @@
"i\\j": 5, "i\\j": 5,
"k\"l": 6, "k\"l": 6,
" ": 7, " ": 7,
"m~n": 8 "m~n": 8,
"obj" : {
"key" : "value"
}
} }