Code example for JSONObject

Methods: optInt

0
    @SmallTest 
    @MediumTest 
    @LargeTest 
    public void testParsedLikes() { 
        JSONObject likes = parsedAction.getLikes();
        assertEquals(1, likes.optInt("count"));
    } 
 
    @SmallTest 
    @MediumTest 
    @LargeTest 
    public void testParsedApplication() { 
        GraphObject application = parsedAction.getApplication();
        assertEquals("Awesome App", application.getProperty("name"));
    } 
 
    @SmallTest 
    @MediumTest 
    @LargeTest 
    public void testParsedComments() { 
        JSONObject comments = parsedAction.getComments();