Пример #1
0
  @Test
  public void testUpdateComment() throws Exception {
    Comment comment = jpaCommentDao.getCommentById(1);
    comment.setName("updatedName");
    Comment returnedComment = jpaCommentDao.updateComment(comment);
    Comment updatedComment = jpaCommentDao.getCommentById(1);

    assertEquals(returnedComment.getName(), "updatedName");
    assertEquals(updatedComment.getName(), "updatedName");
  }
Пример #2
0
 @Test
 public void testGetCommentById() throws Exception {
   Comment comment = jpaCommentDao.getCommentById(1);
   assertEquals(comment.getName(), "commentName1");
 }