()
| 76 | } |
| 77 | |
| 78 | @Test |
| 79 | public void update() throws Exception { |
| 80 | commentDao.deleteAll(1); |
| 81 | CommentDto commentDto = new CommentDto(1, 0, "comment", "asdf"); |
| 82 | assertTrue(commentDao.insert(commentDto)==1); |
| 83 | assertTrue(commentDao.count(1)==1); |
| 84 | |
| 85 | List<CommentDto> list = commentDao.selectAll(1); |
| 86 | commentDto.setCno(list.get(0).getCno()); |
| 87 | commentDto.setComment("comment2"); |
| 88 | assertTrue(commentDao.update(commentDto)==1); |
| 89 | |
| 90 | list = commentDao.selectAll(1); |
| 91 | String comment = list.get(0).getComment(); |
| 92 | String commenter = list.get(0).getCommenter(); |
| 93 | assertTrue(comment.equals(commentDto.getComment())); |
| 94 | assertTrue(commenter.equals(commentDto.getCommenter())); |
| 95 | } |
| 96 | } |
nothing calls this directly
no test coverage detected