Skip to content

Conversation

@Friox
Copy link
Contributor

@Friox Friox commented Aug 6, 2025

관련 Issue (필수)

주요 변경 사항 (필수)

  • ReservationService 테스트 코드 작성
  • SeatReservationService 테스트 코드 작성
  • TicketService 테스트 코드 작성

리뷰어 참고 사항

Warning

위 PR을 반영하여 작업한 브랜치 입니다.
GitHub 상 코드리뷰가 편하도록 작업한 커밋만 분리했습니다.
이 PR 단독으로 테스트가 불가능하며, 별도로 반영해 주셔야 테스트 가능합니다.
모두 머지 또는 해결된 후 리베이스하겠습니다!

booking.application.dto.responseTicketReadResponse에서,
Long seatReservationId를 주석처리해주셔야 TicketService 테스트를 정상적으로 진행할 수 있습니다.

작성한 테스트 코드는 다음과 같습니다.

ReservationService

  • 유효한 요청으로 예약이 성공한다
  • 멤버번호와 예약 ID로 특정 예약 조회에 성공한다
  • 올바른 멤버번호와 잘못된 예약 ID로 특정 예약 조회 시 예외를 반환한다
  • 올바른 멤버번호와 만료된 예약 ID로 특정 예약 조회 시 예외를 반환한다
  • 멤버번호로 관련한 예약 목록 조회에 성공한다
  • 멤버번호로 만료된 예약을 포함한 예약 목록 조회에 성공한다
  • 올바른 예약 삭제 요청 DTO로 예약 삭제에 성공한다
  • 만료된 예약 일괄삭제에 성공한다

SeatReservationService

  • 예약, 좌석, 승객 유형으로 좌석 예약 생성에 성공한다
  • 좌석 예약 ID로 좌석 예약 삭제에 성공한다
  • 예약 ID로 좌석 예약 삭제에 성공한다

TicketService

  • 예약, 좌석, 승객 유형으로 티켓 생성에 성공한다
  • 멤버번호로 가지고 있는 티켓 조회에 성공한다
  • 티켓 ID로 티켓 삭제에 성공한다
  • 예약 ID로 티켓 삭제에 성공한다

추가 정보

없음

PR 작성 체크리스트 (필수)

  • 제목이 Issue와 동일함을 확인했습니다.
  • 리뷰어를 지정했습니다.
  • 프로젝트를 연결했습니다.

Copy link
Contributor

@chanwonlee chanwonlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pr에 자세하게 테스트 목록을 작성해 주셔서 코드 확인하기 수월했습니다! 고생하셨습니다!

Copy link
Contributor

@EndlessMilkyway EndlessMilkyway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

도메인이 복잡해서 테스트를 작성하기 힘드셨을텐데도 불구하고 잘 해주신 것 같습니다. 고생하셨습니다! 👍

Copy link
Contributor

@Ogu1208 Ogu1208 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 열차 조회 테스트 코드 작성하면서 예약쪽 데이터 생성에 머리가 아팠는데 이쪽도 만만치 않군요.. ㅠㅠ
고생하셨습니다!! 👍👍

@Friox Friox force-pushed the test/210-reservation branch from 3613456 to fa83dd9 Compare August 7, 2025 01:47
@Friox Friox merged commit 3707634 into develop Aug 7, 2025
1 check failed
@Friox Friox deleted the test/210-reservation branch August 7, 2025 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[TEST] Reservation 관련 서비스 테스트

5 participants