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

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


        addSnippetParam("ForumService.topicUuid", "Foo");
        addSnippetParam("ForumService.topicTitle", "Foo");
        addSnippetParam("ForumService.topicContent", "Foo");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(404, json.getInt("code"));
        Assert.assertEquals("No existing forum found. Please contact your system administrator.", json.getString("message"));
    }
View Full Code Here


    }
   
    @Test
    public void testGetAllBlogTags() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();        
        Assert.assertEquals(200, json.getAsInt("status"));
    }
View Full Code Here

    }

    @Test
    public void testUpdatePost() {
        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

    }

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

    }

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

      ForumTopic forumTopic = createForumTopic(forum, title, title);
      ForumReply forumReply = createForumReply(forumTopic, title, title);
        addSnippetParam("ForumService.replyUuid", forumReply.getReplyUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        assertForumReplyValid(forumReply, (JsonJavaObject)json);
    }
View Full Code Here

    @Test
    public void testGetForumReplyError() {
        addSnippetParam("ForumService.replyUuid", "Foo");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(404, json.getInt("code"));
        Assert.assertEquals("No existing forum found. Please contact your system administrator.", json.getString("message"));
    }
View Full Code Here

    @Test
    public void testGetForumReplyInvalidArg() {
        addSnippetParam("ForumService.replyUuid", "");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(400, json.getInt("code"));
        Assert.assertEquals("Invalid argument, expected replyUuid.", json.getString("message"));
    }
View Full Code Here

    }
   
    @Test
    public void testCreateBlog() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNotNull(json.getString("uid"));
    }
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.