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

Updates tests to include all opt methods and verify for missing keys.

This commit is contained in:
John J. Aylward 2016-08-09 15:54:06 -04:00
parent 62524b531d
commit a2c311527b
2 changed files with 47 additions and 6 deletions

View file

@ -373,7 +373,10 @@ public class JSONArrayTest {
assertTrue("Array opt value out of range",
null == jsonArray.opt(-1));
assertTrue("Array opt boolean",
assertTrue("Array opt value out of range",
null == jsonArray.opt(jsonArray.length()));
assertTrue("Array opt boolean",
Boolean.TRUE == jsonArray.optBoolean(0));
assertTrue("Array opt boolean default",
Boolean.FALSE == jsonArray.optBoolean(-1, Boolean.FALSE));