Examples of optString()


Examples of org.apache.sling.commons.json.JSONObject.optString()

    JSONObject jsonObject = new JSONObject(json);
   
    JSONObject aceObject = jsonObject.optJSONObject(testUserId);
    assertNotNull(aceObject);

    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);
   
    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNotNull(grantedArray);
    assertEquals(1, grantedArray.length());
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.optString()

    JSONObject jsonObject = new JSONObject(json);
   
    JSONObject aceObject = jsonObject.optJSONObject(testUserId);
    assertNotNull(aceObject);

    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);
   
    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNotNull(grantedArray);
    assertEquals(1, grantedArray.length());
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.optString()

    JSONObject jsonObject = new JSONObject(json);
   
    JSONObject aceObject = jsonObject.optJSONObject(testUserId);
    assertNotNull(aceObject);

    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);
   
    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNotNull(grantedArray);
    assertEquals(1, grantedArray.length());
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.optString()

    JSONObject jsonObject = new JSONObject(json);
   
    JSONObject aceObject = jsonObject.optJSONObject(testUserId);
    assertNotNull(aceObject);

    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);
   
    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNotNull(grantedArray);
    assertTrue(grantedArray.length() >= 8);
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.optString()

    JSONObject jsonObject = new JSONObject(json);
   
    JSONObject aceObject = jsonObject.optJSONObject(testUserId);
    assertNotNull(aceObject);

    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);
   
    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNotNull(grantedArray);
    assertTrue(grantedArray.length() >= 11);
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.optString()

    JSONObject jsonObject = new JSONObject(json);
   
    JSONObject aceObject = jsonObject.optJSONObject(testUserId);
    assertNotNull(aceObject);

    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);
   
    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNull(grantedArray);
   
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.optString()

    JSONObject jsonObject = new JSONObject(json);
   
    JSONObject aceObject = jsonObject.optJSONObject(testUserId);
    assertNotNull(aceObject);

    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);
   
    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNull(grantedArray);
   
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.optString()

    assertNotNull(aceObject);

          int order = aceObject.optInt("order");
          assertEquals(0, order);

    String principalString = aceObject.optString("principal");
    assertEquals(testGroupId, principalString);
   
    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNotNull(grantedArray);
    assertEquals(1, grantedArray.length());
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.optString()

    assertEquals(1, jsonObject.length());
   
    JSONObject aceObject = jsonObject.optJSONObject(testUserId);
    assertNotNull(aceObject);

    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);
   
          int order = aceObject.optInt("order");
          assertEquals(0, order);
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.optString()

    assertEquals(1, jsonObject2.length());
   
    JSONObject aceObject2 = jsonObject2.optJSONObject(testUserId);
    assertNotNull(aceObject2);

    String principalString2 = aceObject2.optString("principal");
    assertEquals(testUserId, principalString2);
   
    JSONArray grantedArray2 = aceObject2.optJSONArray("granted");
    assertNotNull(grantedArray2);
    assertEquals(3, grantedArray2.length());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.