Package com.ibm.commons.util.io.json

Examples of com.ibm.commons.util.io.json.JsonJavaObject


    }

    @Test
    public void testUpdateBlog() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNotNull(json.getString("uid"));
    }
View Full Code Here


    }

    @Test
    public void testUnRecommendPost() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertTrue(json.getString("status").equals("204.0"));
    }
View Full Code Here

    public void testGetCompletedForums() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertFalse(jsonList.isEmpty());
        for (int i=0; i<jsonList.size(); i++) {
            JsonJavaObject json = (JsonJavaObject)jsonList.get(i);
            assertForumGetters(json);
        }
    }
View Full Code Here

    }
   
    @Test
    public void testDeleteBlog() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNotNull(json.getString("deletedBlogId"));
    }
View Full Code Here

    @Test
    public void testCreateForumTopic() {
      addSnippetParam("ForumService.forumUuid", forum.getForumUuid());
     
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        assertForumTopicProperties(json);
    }
View Full Code Here

    }

    @Test
    public void testGetBlogPost() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNotNull(json.getString("uid"));
    }
View Full Code Here

        addSnippetParam("ForumService.forumUuid", forum.getForumUuid());
        addSnippetParam("ForumService.forumTitle", updatedTitle);
        addSnippetParam("ForumService.forumContent", updatedContent);
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
       
        Forum uforum = getForum(forum.getForumUuid());
        Assert.assertEquals(forum.getForumUuid(), json.getString("getForumUuid"));
        Assert.assertEquals(updatedTitle, uforum.getTitle());
        Assert.assertEquals(updatedContent, uforum.getContent());
    }
View Full Code Here

        addSnippetParam("ForumService.forumUuid", "Foo");
        addSnippetParam("ForumService.forumTitle", "Foo");
        addSnippetParam("ForumService.forumContent", "Foo");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(404, json.getInt("code"));
        Assert.assertEquals("CLFRV0008E: Error, unable to find object with uuid: Foo", json.getString("message"));
    }
View Full Code Here

      ForumTopic forumTopic = createForumTopic(forum, title, title);
     
      addSnippetParam("ForumService.topicUuid", forumTopic.getTopicUuid());
     
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        assertForumReplyProperties(json);
    }
View Full Code Here

    public void testGetMyForums() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertFalse(jsonList.isEmpty());
        for (int i=0; i<jsonList.size(); i++) {
            JsonJavaObject json = (JsonJavaObject)jsonList.get(i);
            assertForumGetters(json);
        }
    }
View Full Code Here

TOP

Related Classes of com.ibm.commons.util.io.json.JsonJavaObject

Copyright © 2018 www.massapicom. 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.