Skip to content

[TEST] 장바구니 기능 테스트#221

Merged
Yunsung-Jo merged 5 commits into
developfrom
test/202-cart-service
Aug 7, 2025
Merged

[TEST] 장바구니 기능 테스트#221
Yunsung-Jo merged 5 commits into
developfrom
test/202-cart-service

Conversation

@Yunsung-Jo

Copy link
Copy Markdown
Contributor

관련 Issue (필수)

주요 변경 사항 (필수)

  • ReservationTestHelper 추가
  • 장바구니에 예약이 등록되는지 확인하는 테스트 코드 작성
  • 자신의 예약이 아니라면 예외가 발생하는지 확인하는 테스트 코드 작성
  • 장바구니에 이미 등록된 예약이라면 예외가 발생하는지 확인하는 테스트 코드 작성
  • 장바구니를 조회하는 테스트 코드 작성

리뷰어 참고 사항

ReservationTestHelper

예약과 좌석 예약을 생성할 수 있는 Helper 클래스를 추가했습니다.

Train train = trainTestHelper.createKTX();
TrainScheduleWithStopStations scheduleWithStops = trainScheduleTestHelper.createSchedule(train);

// 예약 생성
Reservation reservation = reservationTestHelper.createReservation(member, scheduleWithStops);

추가 정보

없음

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

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

@EndlessMilkyway EndlessMilkyway left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

확인 완료했습니다! 저 역시 새로운 고객 정보가 필요해 MemberFixture에 새로운 고객을 생성하는 메서드를 만들어야겠다고 생각중이었는데 구현해주셔서 해당 메서드를 그대로 사용될 것 같습니다.

ReservationTestHelper 역시 유용하게 쓸 수 있을 것 같습니다. 고생 많으셨습니다!

@chanwonlee chanwonlee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

작성하신 테스트 코드 확인했습니다! 고생하셨습니다!

@friox friox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

테스트 코드 확인했습니다.
작성해주신 ReservationTestHelper 문제없이 잘 사용했습니다!
고생하셨습니다 👍👍

@Ogu1208 Ogu1208 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

확인했습니다!
덕분에 ReservationTestHelper 활용해서 열차 조회 테스트가 한결 수월해졌습니다 🥲
고생하셨습니다~👍👍

@Yunsung-Jo
Yunsung-Jo force-pushed the test/202-cart-service branch from 342cba4 to 9546c57 Compare August 7, 2025 01:24
@Yunsung-Jo
Yunsung-Jo merged commit 638a35c into develop Aug 7, 2025
1 check passed
@Yunsung-Jo
Yunsung-Jo deleted the test/202-cart-service branch August 7, 2025 01:24
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] 장바구니 기능 테스트

5 participants