assertNotNull(dto.getComments());
assertEquals(dto.getComments().size(), review.getComments().size());
}
private CodeReview getCodeReview() {
CodeReview review = new CodeReview();
review.setId(REVIEW_ID);
CodeReviewComment comment1 = new CodeReviewComment();
comment1.setId(1L);
comment1.setAuthor(new JCUser("username1", "mail1", "password1" ));
comment1.setBody("Comment1 body");
comment1.setLineNumber(1);
comment1.setCreationDate(new DateTime(1));
review.addComment(comment1);
CodeReviewComment comment2 = new CodeReviewComment();
comment2.setId(2L);
comment2.setAuthor(new JCUser("username2", "mail2", "password2" ));
comment2.setBody("Comment2 body");
comment2.setLineNumber(2);
comment2.setCreationDate(new DateTime(2));
review.addComment(comment1);
return review;
}