BoardRepositoryTest
페이지 정보
본문
package web.repository;
import java.util.Optional;
import java.util.stream.IntStream;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import jakarta.transaction.Transactional;
import lombok.extern.log4j.Log4j2;
import web.domain.Board;
@SpringBootTest
@Log4j2
public class BoardRepositoryTest {
@Autowired
private BoardRepository boardRepository;
@Test //추가 테스트
public void testSearch1() {
// 2 page order by bno desc
Pageable pageable = PageRequest.of(1, 10, Sort.by("bno").descending());
boardRepository.search1(pageable);
}
}
- 이전글BoardSearchImpl 24.06.17
- 다음글● Q도메인을 이용한 쿼리 작성 및 테스트 24.06.17
댓글목록
등록된 댓글이 없습니다.