assertEquals(c.getId(), c2.getId());
}
public void testDisableEnable() {
PageEntity page = pageTool.addPage("test");
CommentEntity alex = commentTool.addComment("alex", "content1", page);
CommentEntity roma = commentTool.addComment("roma", "content3", page);
CommentEntity roma1 = commentTool.addComment("roma1", "content4", page);
CommentEntity roma3 = commentTool.addComment("roma3", "content6", page);
List<Long> ids = new ArrayList<Long>();
ids.add(null);
ids.add(alex.getId());
ids.add(roma.getId());
getDao().getCommentDao().disable(ids);
CommentEntity r = getDao().getCommentDao().getById(alex.getId());
assertTrue(r.isDisabled());
r = getDao().getCommentDao().getById(roma.getId());
assertTrue(r.isDisabled());
r = getDao().getCommentDao().getById(roma1.getId());
assertFalse(r.isDisabled());
r = getDao().getCommentDao().getById(roma3.getId());
assertFalse(r.isDisabled());
getDao().getCommentDao().enable(ids);
r = getDao().getCommentDao().getById(alex.getId());
assertFalse(r.isDisabled());
r = getDao().getCommentDao().getById(roma.getId());
assertFalse(r.isDisabled());
}