Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Fix: 사용하지 않는 테스트 코드 주석 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhyun1 committed Nov 27, 2023
1 parent a7719b4 commit 1fa1754
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@ class ReservationServiceTest implements DummyObjectForRoom, DummyReservationDTO,
@InjectMocks
ReservationService reservationService;

@Test
void createReservation_success() {
//given
given(tourAPIService.bringAccommodation(anyLong(), any())).willReturn(dummyAccommodation());
given(tourAPIService.bringRoom(anyLong(), anyLong())).willReturn(dummyRoom(dummyAccommodation()));
given(roomRepository.findByRoomTypeId(any())).willReturn(Optional.empty());
given(roomRepository.save(any(Room.class))).willReturn(dummyRoom(dummyAccommodation()));
given(accommodationRepository.findById(any())).willReturn(Optional.ofNullable(dummyAccommodation()));
given(memberRepository.findByEmail(any())).willReturn(Optional.ofNullable(dummyMember()));
given(reservationRepository.save(any(Reservation.class))).willReturn(dummyReservation());

//when
var actual = reservationService.createReservation(dummyMember().getEmail(), dummyReservationCreateReq());

//then
var expected = dummyReservationCreateRes();
assertEquals(actual, expected);

}
// @Test
// void createReservation_success() {
// //given
// given(tourAPIService.bringAccommodation(anyLong(), any())).willReturn(dummyAccommodation());
// given(tourAPIService.bringRoom(anyLong(), anyLong())).willReturn(dummyRoom(dummyAccommodation()));
// given(roomRepository.findByRoomTypeId(any())).willReturn(Optional.empty());
// given(roomRepository.save(any(Room.class))).willReturn(dummyRoom(dummyAccommodation()));
// given(accommodationRepository.findById(any())).willReturn(Optional.ofNullable(dummyAccommodation()));
// given(memberRepository.findByEmail(any())).willReturn(Optional.ofNullable(dummyMember()));
// given(reservationRepository.save(any(Reservation.class))).willReturn(dummyReservation());
//
// //when
// var actual = reservationService.createReservation(dummyMember().getEmail(), dummyReservationCreateReq());
//
// //then
// var expected = dummyReservationCreateRes();
// assertEquals(actual, expected);
//
// }

@Test
void updateReservationStatusToPay_success() {
Expand Down

0 comments on commit 1fa1754

Please sign in to comment.