| 44 | } |
| 45 | |
| 46 | @Test |
| 47 | public void selectAll() throws Exception { |
| 48 | commentDao.deleteAll(1); |
| 49 | CommentDto commentDto = new CommentDto(1, 0, "comment", "asdf"); |
| 50 | assertTrue(commentDao.insert(commentDto)==1); |
| 51 | assertTrue(commentDao.count(1)==1); |
| 52 | |
| 53 | List<CommentDto> list = commentDao.selectAll(1); |
| 54 | assertTrue(list.size()==1); |
| 55 | |
| 56 | commentDto = new CommentDto(1, 0, "comment", "asdf"); |
| 57 | assertTrue(commentDao.insert(commentDto)==1); |
| 58 | assertTrue(commentDao.count(1)==2); |
| 59 | |
| 60 | list = commentDao.selectAll(1); |
| 61 | assertTrue(list.size()==2); |
| 62 | } |
| 63 | |
| 64 | @Test |
| 65 | public void select() throws Exception { |