Examples of Comments


Examples of com.colorfulsoftware.rss.Comments

      assertNotNull(rss1.getChannel());

      List<Item> items = rss1.getChannel().getItems();
      assertNotNull(items);
      for (Item item : items) {
        Comments comments = item.getComments();
        assertNotNull(comments);
        assertNotNull(comments.getComments());
      }

    } catch (Exception e) {
      e.printStackTrace();
      fail("should be working. " + e.getLocalizedMessage());
    }

    try {
      rssDoc.buildComments(null);
      fail("should not get here.");
    } catch (RSSpectException r) {
      assertEquals(r.getMessage(), "comments SHOULD NOT be blank.");
    }

    try {
      rssDoc.buildComments("");
      fail("should not get here.");
    } catch (RSSpectException r) {
      assertEquals(r.getMessage(), "comments SHOULD NOT be blank.");
    }

    try {
      Comments comments = rssDoc.buildComments("these are comments");
      assertNotNull(comments);
      assertEquals(comments.getComments(), "these are comments");
    } catch (RSSpectException r) {
      fail("should not get here.");
    }
  }
View Full Code Here

Examples of com.colorfulsoftware.rss.Comments

      assertNotNull(rss1.getChannel());

      List<Item> items = rss1.getChannel().getItems();
      assertNotNull(items);
      for (Item item : items) {
        Comments comments = item.getComments();
        assertNotNull(comments);
        assertNotNull(comments.getComments());
      }

    } catch (Exception e) {
      e.printStackTrace();
      fail("should be working. " + e.getLocalizedMessage());
    }

    try {
      rssDoc.buildComments(null);
      fail("should not get here.");
    } catch (RSSpectException r) {
      assertEquals(r.getMessage(), "comments SHOULD NOT be blank.");
    }

    try {
      rssDoc.buildComments("");
      fail("should not get here.");
    } catch (RSSpectException r) {
      assertEquals(r.getMessage(), "comments SHOULD NOT be blank.");
    }

    try {
      Comments comments = rssDoc.buildComments("these are comments");
      assertNotNull(comments);
      assertEquals(comments.getComments(), "these are comments");
    } catch (RSSpectException r) {
      fail("should not get here.");
    }
  }
View Full Code Here

Examples of com.github.jreddit.retrieval.Comments

      /***************************************************************************************************
       * First: basic API functionality
      */
     
      // Handle to Comments, which offers the basic API functionality
      Comments coms = new Comments(restClient, user);
     
      // Retrieve comments of a submission
      System.out.println("\n============== Basic submission comments ==============");
      List<Comment> commentsSubmission = coms.ofSubmission("29p8fe", null, 0, 8, 100, CommentSort.TOP);
      Comments.printCommentTree(commentsSubmission);
     
     
      // Retrieve comments of a user
      System.out.println("\n============== Basic user comments ==============");
      List<Comment> commentsUser = coms.ofUser("Unidan", UserOverviewSort.NEW, TimeSpan.ALL, -1, 80, null, null, true);
      Comments.printCommentTree(commentsUser); // Note: this tree is already flat, because listing is one level
     
     
      /***************************************************************************************************
       * Second: extended API functionality
View Full Code Here

Examples of com.google.gdata.data.extensions.Comments

   *                     If the service is unable to handle the request.
   * @throws IOException error sending request or reading the feed.
   */
  private static void printCommentsFeed(VideoEntry videoEntry)
      throws IOException, ServiceException {
    Comments comments = videoEntry.getComments();
    if (comments != null && comments.getFeedLink() != null) {
      System.out.println("\tComments:");
      printFeed(videoEntry.getService(), comments.getFeedLink().getHref(),
          "Comment");
    }
  }
View Full Code Here

Examples of com.jcabi.github.Comments

     * MkComments can iterate comments.
     * @throws Exception If some problem inside
     */
    @Test
    public void iteratesComments() throws Exception {
        final Comments comments = this.comments();
        comments.post("hello, dude!");
        comments.post("hello again");
        MatcherAssert.assertThat(
            comments.iterate(),
            Matchers.<Comment>iterableWithSize(2)
        );
    }
View Full Code Here

Examples of com.redhat.gss.redhat_support_lib.infrastructure.Comments

    solutions = new Solutions(connectionManager);
    articles = new Articles(connectionManager);
    cases = new Cases(connectionManager);
    products = new Products(connectionManager);
    comments = new Comments(connectionManager);
    entitlements = new Entitlements(connectionManager);
    problems = new Problems(connectionManager);
    attachments = new Attachments(connectionManager);
    ping = new Ping(connectionManager);
    groups = new Groups(connectionManager);
View Full Code Here

Examples of com.restfb.types.Post.Comments

  public void check_2_1_comments_likes_count() {
    Connection<Post> con =
        new Connection<Post>(new DefaultFacebookClient(), jsonFromClasspath("v2_1/feed-got"), Post.class);
    List<Post> postPage = con.getData();
    for (Post post : postPage) {
      Comments cs = post.getComments();
      if (null != cs && !cs.getData().isEmpty()) {
        Assert.assertTrue(cs.getTotalCount() > 0);
      }
      Likes ls = post.getLikes();
      if (null != ls && !ls.getData().isEmpty()) {
        Assert.assertTrue(ls.getCount() > 0);
      }
View Full Code Here

Examples of entity.Comments

        Enrollment enrollment = enrollentJPAController.findEnrollment(userID, courseID);

        boolean success = false;
       
        if (enrollment != null) {
            Comments comments = new Comments();
            comments.setEnrollmentId(enrollment);
            comments.setSysdate(new Date());
            comments.setComment(comment);
           
            CommentsJpaController commentsJPAContoller = new CommentsJpaController();
            commentsJPAContoller.create(comments);
           
            success = true;
View Full Code Here

Examples of entity.Comments

        //********************************
       
        // Second generate a map list of comments
        ArrayList commentMapList = new ArrayList();
        for (Iterator<Comments> it = commentsList.iterator(); it.hasNext();) {
            Comments comment = it.next();
           
            Map commentMap = new HashMap();
            commentMap.put("commentID",         new Integer(comment.getId()));
            commentMap.put("commentDetail",     new String(comment.getComment()));
            commentMap.put("commentDate",       new String(comment.getSysdate().toString()));
            commentMap.put("commentUserName",   new String(comment.getEnrollmentId().getUserId().getName()));
            commentMapList.add(commentMap);
        }

        //********************************
       
View Full Code Here

Examples of entity.Comments

        return emf.createEntityManager();
    }

    public void create(Commentrates commentrates) throws IllegalOrphanException, PreexistingEntityException, Exception {
        List<String> illegalOrphanMessages = null;
        Comments commentsOrphanCheck = commentrates.getComments();
        if (commentsOrphanCheck != null) {
            Commentrates oldCommentratesOfComments = commentsOrphanCheck.getCommentrates();
            if (oldCommentratesOfComments != null) {
                if (illegalOrphanMessages == null) {
                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("The Comments " + commentsOrphanCheck + " already has an item of type Commentrates whose comments column cannot be null. Please make another selection for the comments field.");
            }
        }
        if (illegalOrphanMessages != null) {
            throw new IllegalOrphanException(illegalOrphanMessages);
        }
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Comments comments = commentrates.getComments();
            if (comments != null) {
                comments = em.getReference(comments.getClass(), comments.getId());
                commentrates.setComments(comments);
            }
            em.persist(commentrates);
            if (comments != null) {
                comments.setCommentrates(commentrates);
                comments = em.merge(comments);
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findCommentrates(commentrates.getId()) != null) {
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.