Пример #1
0
 /** Creates a CookieList from an empty string. */
 @Test
 public void emptyStringCookieList() {
   String cookieStr = "";
   String expectedCookieStr = "";
   JSONObject jsonObject = CookieList.toJSONObject(cookieStr);
   assertTrue(jsonObject.length() == 0);
 }
Пример #2
0
 /** CookieList from a JSONObject with valid key and null value */
 @Test
 public void convertCookieListWithNullValueToString() {
   JSONObject jsonObject = new JSONObject();
   jsonObject.put("key", JSONObject.NULL);
   String cookieToStr = CookieList.toString(jsonObject);
   assertTrue("toString() should be empty", "".equals(cookieToStr));
 }