| 89 | } |
| 90 | |
| 91 | @Test |
| 92 | public void selectAllTest() throws Exception { |
| 93 | boardDao.deleteAll(); |
| 94 | assertTrue(boardDao.count()==0); |
| 95 | |
| 96 | List<BoardDto> list = boardDao.selectAll(); |
| 97 | assertTrue(list.size() == 0); |
| 98 | |
| 99 | BoardDto boardDto = new BoardDto("no title", "no content", "asdf"); |
| 100 | assertTrue(boardDao.insert(boardDto)==1); |
| 101 | |
| 102 | list = boardDao.selectAll(); |
| 103 | assertTrue(list.size() == 1); |
| 104 | |
| 105 | assertTrue(boardDao.insert(boardDto)==1); |
| 106 | list = boardDao.selectAll(); |
| 107 | assertTrue(list.size() == 2); |
| 108 | } |
| 109 | |
| 110 | @Test |
| 111 | public void selectTest() throws Exception { |