▲ BoardMapperTests.java
페이지 정보
본문
package com.pkt.controller;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.pkt.mapper.BoardMapper;
import com.pkt.model.BoardVO;
import lombok.Setter;
import lombok.extern.log4j.Log4j;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "file:src/main/webapp/WEB-INF/root-context.xml" })
@Log4j
public class BoardMapperTests {
@Setter(onMethod_ = @Autowired)
private BoardMapper mapper;
@Test //페이징 테스트 추가
public void testListPage() {
int page = 1;
List<BoardVO> list = mapper.listPage(page);
for (BoardVO boardVO : list) {
log.info(boardVO.getBno() + ":" + boardVO.getTitle());
}
}
}
- 이전글BoardMapper.xml 24.07.30
- 다음글== 공란 == 24.07.30
댓글목록
등록된 댓글이 없습니다.