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

* Update link in the README to the main JSON-Java repo

* Cleans up some warnings
* Adds new test for bug https://github.com/stleary/JSON-java/issues/332
* Adds some resource handling for string writers using pre-java1.7
support. I know StringWriters don't need a close method called, but the
tests should still handle their resources properly.
This commit is contained in:
John J. Aylward 2017-04-27 12:39:42 -04:00
parent f6ab6d7b27
commit 9df5d34bbe
10 changed files with 2878 additions and 2703 deletions

View file

@ -5,7 +5,6 @@ import static org.junit.Assert.assertTrue;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.json.JSONArray;
import org.json.JSONObject;
@ -92,7 +91,7 @@ public class EnumTest {
assertTrue("expected 3 top level items", ((Map<?,?>)(JsonPath.read(doc, "$"))).size() == 3);
assertTrue("expected VAL1", MyEnumField.VAL1.equals(jsonObject.query("/VAL1")));
assertTrue("expected VAL2", MyEnumField.VAL2.equals(jsonObject.query("/VAL2")));
assertTrue("expected VAL3", myEnumField.VAL3.equals(jsonObject.query("/VAL3")));
assertTrue("expected VAL3", MyEnumField.VAL3.equals(jsonObject.query("/VAL3")));
}
/**