// @Test public void testUpdate() throws Exception { BoardVO board = new BoardVO(); board.setBno(100); board.setTitle("수정된 글입니다."); board.setContent("수정 테스트 "); dao.update(board); }
// @Test public void testCreate() throws Exception { BoardVO board = new BoardVO(); board.setTitle("새로운 글을 넣습니다."); board.setContent("새로운 글을 넣습니다."); board.setWriter("user00"); dao.create(board); }
// @Test public void testListPage() throws Exception { int page = 3; List<BoardVO> list = dao.listPage(page); for (BoardVO boardVO : list) { logger.info(boardVO.getBno() + ":" + boardVO.getTitle()); } }
// @Test public void testListCriteria() throws Exception { Criteria cri = new Criteria(); cri.setPage(2); cri.setPerPageNum(20); List<BoardVO> list = dao.listCriteria(cri); for (BoardVO boardVO : list) { logger.info(boardVO.getBno() + ":" + boardVO.getTitle()); } }
@Test public void testDynamic1() throws Exception { SearchCriteria cri = new SearchCriteria(); cri.setPage(1); cri.setKeyword("글"); cri.setSearchType("t"); logger.info("========================================"); List<BoardVO> list = dao.listSearch(cri); for (BoardVO boardVO : list) { logger.info(boardVO.getBno() + ": " + boardVO.getTitle()); } logger.info("========================================"); logger.info("COUNT: " + dao.listSearchCount(cri)); }