Examples of JavaScriptPreviewPage


Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

      String title = createForumTopicName();
      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

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

   
    @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

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

   
    @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

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

        setAuthType(AuthType.AUTO_DETECT);
    }

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

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

        setAuthType(AuthType.AUTO_DETECT);
    }

    @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

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

        setAuthType(AuthType.AUTO_DETECT);
    }

    @Test
    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

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

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

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

    @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

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

        setAuthType(AuthType.AUTO_DETECT);
    }

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

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

       
        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());
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.