| 73 | } |
| 74 | |
| 75 | @Test |
| 76 | public void insertTest() throws Exception { |
| 77 | boardDao.deleteAll(); |
| 78 | BoardDto boardDto = new BoardDto("no title", "no content", "asdf"); |
| 79 | assertTrue(boardDao.insert(boardDto)==1); |
| 80 | |
| 81 | boardDto = new BoardDto("no title", "no content", "asdf"); |
| 82 | assertTrue(boardDao.insert(boardDto)==1); |
| 83 | assertTrue(boardDao.count()==2); |
| 84 | |
| 85 | boardDao.deleteAll(); |
| 86 | boardDto = new BoardDto("no title", "no content", "asdf"); |
| 87 | assertTrue(boardDao.insert(boardDto)==1); |
| 88 | assertTrue(boardDao.count()==1); |
| 89 | } |
| 90 | |
| 91 | @Test |
| 92 | public void selectAllTest() throws Exception { |