Examples of ForumReply


Examples of com.ibm.sbt.services.client.connections.forums.ForumReply

    @Test
    public void testGetForumReply() {
      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.services.client.connections.forums.ForumReply

    @Test
    public void testDeleteForumReply() {
      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();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        Assert.assertEquals(forumReply.getReplyUuid(), json.getString("replyUuid"));
       
        forumReply = getForumReply(forumReply.getTopicUuid(), false);
        Assert.assertNull("Deleted forum topic is still available", forumReply);
    }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.forums.ForumReply

        String updatedTitle = "Updated Title - " + System.currentTimeMillis();
        String updatedContent = "Updated Content - " + System.currentTimeMillis();
       
      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
      ForumReply forumReply = createForumReply(forumTopic, title, title);
        addSnippetParam("ForumService.replyUuid", forumReply.getReplyUuid());
        addSnippetParam("ForumService.replyTitle", updatedTitle);
        addSnippetParam("ForumService.replyContent", updatedContent);
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
       
        forumReply = getForumReply(forumReply.getReplyUuid());
        Assert.assertEquals(forumReply.getReplyUuid(), json.getString("getReplyUuid"));
        Assert.assertEquals(updatedTitle, forumReply.getTitle());
        Assert.assertEquals(updatedContent, StringUtil.trim(forumReply.getContent()));
    }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.forums.ForumReply

  protected Element answer() {
    if (!isForumReply()) {
      return null;
    }
    ForumReply reply = (ForumReply) entity;
    return reply.isAnswer() ? element(CATEGORY,
        attribute(SCHEME, Namespace.FLAGS.getUrl()),
        attribute(TERM, ANSWER)) : null;
  }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.forums.ForumReply

  protected Element inReplyTo() {
    if (!isForumReply()) {
      return null;
    }
    ForumReply reply = (ForumReply) entity;
    return element(
        THR_IN_REPLY_TO,
        attribute(XMLNS_THR, Namespace.THR.getUrl()),
        attribute(REF, "urn:lsid:ibm.com:forum:" + reply.getTopicUuid()));
  }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.forums.ForumReply

    }
   
    protected ForumReply createForumReply(ForumTopic forumTopic, String title, String content) {
      ForumService forumService = getForumService();
     
      ForumReply forumReply = new ForumReply(forumService);
      forumReply.setTopicUuid(forumTopic.getTopicUuid());
      forumReply.setTitle(title);
      forumReply.setContent(content);
     
      try {
        return forumService.createForumReply(forumReply);
      } catch (Exception fse) {
        fail("Error creating forum reply", fse);
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.