public List<CommentData> GetStatusComments(String statusID, int mount) { try { List<Comment> status = cm.getCommentById(statusID).getComments(); List<CommentData> statusDatas = new ArrayList<CommentData>() {}; for (Comment status2 : status) { statusDatas.add(DataConverter.ConvertFrom(status2)); } return statusDatas; } catch (Exception e) { // TODO: handle exception return new ArrayList<CommentData>(); } }
private void checkComment(Comments expected, Node commentNode) { assertTrue(commentNode.getNodeType() == Node.COMMENT_NODE); Comment comment = (Comment) commentNode; assertEquals(expected.toString(), comment.getTextContent()); }
private void checkComment(Comments expected, CommentSets comments, String commentKey, int index) { List<String> commentsList = comments.getCommentSet(commentKey); assertTrue(commentsList.size() > 0); assertTrue(commentsList.size() > index); assertEquals(expected.toString(), commentsList.get(index)); }