| 31 | } |
| 32 | |
| 33 | @Test |
| 34 | public void deleteAllTest() throws Exception { |
| 35 | boardDao.deleteAll(); |
| 36 | assertTrue(boardDao.count()==0); |
| 37 | |
| 38 | BoardDto boardDto = new BoardDto("no title", "no content", "asdf"); |
| 39 | assertTrue(boardDao.insert(boardDto)==1); |
| 40 | assertTrue(boardDao.deleteAll()==1); |
| 41 | assertTrue(boardDao.count()==0); |
| 42 | |
| 43 | boardDto = new BoardDto("no title", "no content", "asdf"); |
| 44 | assertTrue(boardDao.insert(boardDto)==1); |
| 45 | assertTrue(boardDao.insert(boardDto)==1); |
| 46 | assertTrue(boardDao.deleteAll()==2); |
| 47 | assertTrue(boardDao.count()==0); |
| 48 | } |
| 49 | |
| 50 | @Test |
| 51 | public void deleteTest() throws Exception { |