-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4482c68
commit 1f04832
Showing
5 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,9 @@ | |
import com.prgrms.catchtable.common.base.BaseIntegrationTest; | ||
import com.prgrms.catchtable.common.data.shop.ShopData; | ||
import com.prgrms.catchtable.jwt.token.Token; | ||
import com.prgrms.catchtable.member.MemberFixture; | ||
import com.prgrms.catchtable.member.domain.Member; | ||
import com.prgrms.catchtable.member.repository.MemberRepository; | ||
import com.prgrms.catchtable.owner.domain.Owner; | ||
import com.prgrms.catchtable.owner.fixture.OwnerFixture; | ||
import com.prgrms.catchtable.owner.repository.OwnerRepository; | ||
|
@@ -44,6 +47,8 @@ class OwnerReservationControllerTest extends BaseIntegrationTest { | |
private ShopRepository shopRepository; | ||
@Autowired | ||
private ReservationRepository reservationRepository; | ||
@Autowired | ||
private MemberRepository memberRepository; | ||
|
||
@BeforeEach | ||
void setUp() { | ||
|
@@ -53,8 +58,11 @@ void setUp() { | |
ReservationTime savedReservationTime = reservationTimeRepository.save(reservationTime); | ||
savedReservationTime.setOccupiedTrue(); | ||
log.info("예약 시간 차지 여부 : {}", savedReservationTime.isOccupied()); | ||
|
||
Member member = MemberFixture.member("[email protected]"); | ||
Member savedMember = memberRepository.save(member); | ||
Reservation reservation = reservationRepository.save( | ||
ReservationFixture.getReservation(savedReservationTime)); | ||
ReservationFixture.getReservationWithMember(savedReservationTime,savedMember)); | ||
|
||
ReservationTime reservationTime2 = ReservationFixture.getAnotherReservationTimeNotPreOccupied(); | ||
reservationTime2.insertShop(shop); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,10 @@ void findByIdWithReservationTimeAndShop() { | |
reservationTime.insertShop(savedShop); | ||
ReservationTime savedReservationTime = reservationTimeRepository.save(reservationTime); | ||
|
||
Reservation reservation = ReservationFixture.getReservation(savedReservationTime); | ||
Member member = MemberFixture.member("[email protected]"); | ||
Member savedMember = memberRepository.save(member); | ||
|
||
Reservation reservation = ReservationFixture.getReservationWithMember(savedReservationTime, savedMember); | ||
Reservation savedReservation = reservationRepository.save(reservation); | ||
|
||
Reservation findReservation = reservationRepository.findByIdWithReservationTimeAndShop( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,7 +204,7 @@ void modifyReservation() { | |
ReservationTime modifyTime = ReservationFixture.getAnotherReservationTimeNotPreOccupied(); | ||
ReflectionTestUtils.setField(modifyTime, "id", 2L); //수정하려는 예약시간 객체 -> Id : 2 | ||
|
||
Reservation reservation = ReservationFixture.getReservation(reservationTime); | ||
Reservation reservation = ReservationFixture.getReservationWithMember(reservationTime, MemberFixture.member("[email protected]")); | ||
ModifyReservationRequest request = ReservationFixture.getModifyReservationRequest( | ||
2L); | ||
|
||
|