Skip to content

Commit

Permalink
fix : conflict resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
kkangh00n committed Jan 7, 2024
1 parent a6d3196 commit 2a8801b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

public class OwnerFixture {

public static Owner getOwner() {
public static Owner getOwner(String email, String password) {
Owner owner = Owner.builder()
.name("ownerA")
.email(email)
.password(password)
.phoneNumber("010-3462-2480")
.gender(MALE)
.dateBirth(LocalDate.of(2000, 9, 13))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void setUp() {
Reservation reservation2 = reservationRepository.save(
ReservationFixture.getReservation(savedReservationTime2));

Owner owner = OwnerFixture.getOwner();
Owner owner = OwnerFixture.getOwner("email", "password");
owner.insertShop(shop);
ownerRepository.save(owner);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void getAllReservation() {

reservations.add(reservation1);
reservations.add(reservation2);
Owner owner = OwnerFixture.getOwner();
Owner owner = OwnerFixture.getOwner("email", "password");
when(reservationRepository.findAllWithReservationTimeAndShopByShopId(
any(Long.class))).thenReturn(reservations);
when(ownerRepository.findById(any(Long.class))).thenReturn(Optional.of(owner));
Expand All @@ -127,7 +127,7 @@ void getAllReservation() {
@Test
@DisplayName("매장에 예약이 없을 시 빈 리스트가 조회된다.")
void getAllReservationEmpty() {
Owner owner = OwnerFixture.getOwner();
Owner owner = OwnerFixture.getOwner("email", "password");

when(reservationRepository.findAllWithReservationTimeAndShopByShopId(
any(Long.class))).thenReturn(List.of());
Expand Down

0 comments on commit 2a8801b

Please sign in to comment.