mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-06 18:55:30 +08:00
Fix some todos, clean up some tests, improve coverage
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user