BoardServiceTests
페이지 정보
본문
package web.service;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import lombok.extern.log4j.Log4j2;
import web.dto.BoardDTO;
import web.dto.BoardImageDTO;
import web.dto.BoardListAllDTO;
import web.dto.PageRequestDTO;
import web.dto.PageResponseDTO;
@SpringBootTest
@Log4j2
public class BoardServiceTests {
@Autowired
private BoardService boardService;
@Test
public void testListWithAll() {
PageRequestDTO pageRequestDTO = PageRequestDTO.builder()
.page(1)
.size(10)
.build();
PageResponseDTO<BoardListAllDTO> responseDTO = boardService.listWithAll(pageRequestDTO);
List<BoardListAllDTO> dtoList = responseDTO.getDtoList();
dtoList.forEach(boardListAllDTO -> {
log.info(boardListAllDTO.getBno()+" : "+boardListAllDTO.getTitle());
if(boardListAllDTO.getBoardImages() != null) {
for(BoardImageDTO boardImage : boardListAllDTO.getBoardImages()) {
log.info(boardImage);
}
}
log.info("---------------------------------");
});
}
...
...
}
- 이전글BoardServiceImpl 24.07.02
- 다음글● 게시물 삭제 처리 24.07.02
댓글목록
등록된 댓글이 없습니다.