| 157 | } |
| 158 | |
| 159 | @Test |
| 160 | public void updateTest() throws Exception { |
| 161 | boardDao.deleteAll(); |
| 162 | BoardDto boardDto = new BoardDto("no title", "no content", "asdf"); |
| 163 | assertTrue(boardDao.insert(boardDto)==1); |
| 164 | |
| 165 | Integer bno = boardDao.selectAll().get(0).getBno(); |
| 166 | System.out.println("bno = " + bno); |
| 167 | boardDto.setBno(bno); |
| 168 | boardDto.setTitle("yes title"); |
| 169 | assertTrue(boardDao.update(boardDto)==1); |
| 170 | |
| 171 | BoardDto boardDto2 = boardDao.select(bno); |
| 172 | assertTrue(boardDto.equals(boardDto2)); |
| 173 | } |
| 174 | |
| 175 | @Test |
| 176 | public void increaseViewCntTest() throws Exception { |