Skip to content

Commit

Permalink
style : 미사용 코드 제거 (CC-173)
Browse files Browse the repository at this point in the history
  • Loading branch information
j2noo committed Aug 21, 2024
1 parent af43712 commit b4c2cfb
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,9 @@ class FindingGamePlayServiceTest {
@Mock
private FindingGameDbRepository findingGameDbRepository;

@Mock
private FindingGameWinnerRepository findingGameWinnerRepository;

@Mock
private FindingGameAnswerDbRepository findingGameAnswerDbRepository;

@Mock
private UserRepository userRepository;


@Mock
private Clock clock;

Expand Down Expand Up @@ -128,7 +121,6 @@ void getHint_0() {
Mockito.when(clock.getZone()).thenReturn(ZoneId.systemDefault());
Mockito.when(clock.instant()).thenReturn(fixedInstant);


// when
PositionDto hintDto = findingGamePlayService.getHint(hintRequestDto).hintPosition();

Expand Down Expand Up @@ -156,7 +148,6 @@ void getHint_1() {
Mockito.when(clock.getZone()).thenReturn(ZoneId.systemDefault());
Mockito.when(clock.instant()).thenReturn(fixedInstant);


// when
PositionDto hintDto = findingGamePlayService.getHint(hintRequestDto).hintPosition();

Expand Down Expand Up @@ -190,11 +181,9 @@ void getHint_2_Exception() {
Mockito.when(clock.getZone()).thenReturn(ZoneId.systemDefault());
Mockito.when(clock.instant()).thenReturn(fixedInstant);


// when & then
Assertions.assertThatThrownBy(() -> findingGamePlayService.getHint(hintRequestDto).hintPosition())
.isInstanceOf(FindingGameException.class);

}

@Test
Expand Down Expand Up @@ -230,7 +219,6 @@ void checkAnswer_316() {

Assertions.assertThat(answerResponseDto.startTime()).isEqualTo(-1L);
Assertions.assertThat(answerResponseDto.ticketId()).isEqualTo("");

}

@Test
Expand All @@ -251,10 +239,8 @@ void checkAnswer_315() {
.build()
);

//
Clock fixedClock = Clock.fixed(fixedInstant, ZoneId.systemDefault());


AnswerRequestDto answerRequestDto = AnswerRequestDto.builder()
.answerList(userAnswers)
.build();
Expand All @@ -269,13 +255,10 @@ void checkAnswer_315() {
Mockito.when(findingGameRedisRepository.addWinner(Mockito.anyString()))
.thenReturn(fixedClock.millis());


// when
AnswerResponseDto answerResponseDto = findingGamePlayService.checkAnswer(answerRequestDto);

Assertions.assertThat(answerResponseDto.startTime()).isEqualTo(fixedClock.millis());
Assertions.assertThat(answerResponseDto.ticketId()).isNotEqualTo("");


}
}

0 comments on commit b4c2cfb

Please sign in to comment.