Skip to content

Commit 8ac5fb3

Browse files
committed
[test] #110 테스트코드 매칭 조회 시 Optional 로 변경
1 parent 366a97a commit 8ac5fb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/org/festimate/team/domain/matching/service/impl/MatchingServiceImplTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import static org.festimate.team.common.mock.MockFactory.*;
3434
import static org.mockito.Mockito.when;
3535

36-
public class MatchingServiceImplTest {
36+
class MatchingServiceImplTest {
3737
@Mock
3838
private MatchingRepository matchingRepository;
3939

@@ -263,7 +263,7 @@ void getMatchingDetail_invalidFestival_throwsException() {
263263
when(userService.getUserByIdOrThrow(user.getUserId())).thenReturn(user);
264264
when(festivalService.getFestivalByIdOrThrow(requestedFestival.getFestivalId())).thenReturn(requestedFestival);
265265
when(participantService.getParticipantOrThrow(user, requestedFestival)).thenReturn(participant);
266-
when(matchingRepository.findByMatchingId(1L)).thenReturn(mismatchedMatching);
266+
when(matchingRepository.findByMatchingId(1L)).thenReturn(Optional.of(mismatchedMatching));
267267

268268
// when & then
269269
assertThatThrownBy(() -> matchingService.getMatchingDetail(user.getUserId(), requestedFestival.getFestivalId(), 1L))

0 commit comments

Comments
 (0)