mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 16:00:51 -07:00
Fix some todos, clean up some tests, improve coverage
This commit is contained in:
parent
4ddd6a19a7
commit
fc318a765c
2 changed files with 58 additions and 31 deletions
|
@ -143,6 +143,11 @@ public class CookieListTest {
|
|||
"name5=myCookieValue5;"+
|
||||
" name6=myCookieValue6;";
|
||||
JSONObject jsonObject = CookieList.toJSONObject(cookieStr);
|
||||
// exercise CookieList.toString()
|
||||
String cookieListString = CookieList.toString(jsonObject);
|
||||
// have to convert it back for validation
|
||||
jsonObject = CookieList.toJSONObject(cookieListString);
|
||||
|
||||
// validate JSON content
|
||||
Object doc = Configuration.defaultConfiguration().jsonProvider().parse(jsonObject.toString());
|
||||
assertTrue("Expected 6 top level items", ((Map<?,?>)(JsonPath.read(doc, "$"))).size() == 6);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue