Skip to content

Commit

Permalink
test: event 초기화 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hanueleee committed Oct 16, 2023
1 parent cc7930c commit 431f46a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class 리뷰_삭제_이벤트_발행 {
// then
final var count = events.stream(ReviewDeleteEvent.class).count();
assertThat(count).isEqualTo(1);
events.clear();
}

@Test
Expand All @@ -69,6 +70,7 @@ class 리뷰_삭제_이벤트_발행 {
// then
final var count = events.stream(ReviewDeleteEvent.class).count();
assertThat(count).isEqualTo(0);
events.clear();
}
}

Expand All @@ -90,6 +92,7 @@ class 이미지_삭제_로직_작동 {

// then
verify(uploader, timeout(1000).times(1)).delete(any());
events.clear();
}

@Test
Expand All @@ -107,6 +110,7 @@ class 이미지_삭제_로직_작동 {

// then
verify(uploader, timeout(1000).times(0)).delete(any());
events.clear();
}

@Test
Expand All @@ -128,6 +132,7 @@ class 이미지_삭제_로직_작동 {

// then
assertThat(reviewRepository.findById(review.getId())).isEmpty();
events.clear();
}
}
}

0 comments on commit 431f46a

Please sign in to comment.