From 34e5aa78df080ab48ff4f0d36528dbc419081751 Mon Sep 17 00:00:00 2001 From: JunH Date: Sun, 30 Jul 2023 16:22:02 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20(#95)=20PostServiceTest=EC=9D=98=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=EC=97=90=EC=84=9C=20finded=20=EB=8B=A8?= =?UTF-8?q?=EC=96=B4=EB=A5=BC=20found=EB=A1=9C=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/post/service/PostServiceTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/src/test/java/com/votogether/domain/post/service/PostServiceTest.java b/backend/src/test/java/com/votogether/domain/post/service/PostServiceTest.java index 5715fae19..f8a6e3e5a 100644 --- a/backend/src/test/java/com/votogether/domain/post/service/PostServiceTest.java +++ b/backend/src/test/java/com/votogether/domain/post/service/PostServiceTest.java @@ -342,7 +342,7 @@ void postClosedEarlyById() throws InterruptedException { .build() ); - Post findedPost = postRepository.findById(post.getId()).get(); + Post foundPost = postRepository.findById(post.getId()).get(); Thread.sleep(50); // when @@ -350,8 +350,8 @@ void postClosedEarlyById() throws InterruptedException { // then assertAll( - () -> assertThat(findedPost.getId()).isEqualTo(post.getId()), - () -> assertThat(findedPost.getDeadline()).isBefore(oldDeadline) + () -> assertThat(foundPost.getId()).isEqualTo(post.getId()), + () -> assertThat(foundPost.getDeadline()).isBefore(oldDeadline) ); } @@ -369,10 +369,10 @@ void throwExceptionNotWriterPostClosedEarly() { .build() ); - Post findedPost = postRepository.findById(post.getId()).get(); + Post foundPost = postRepository.findById(post.getId()).get(); // when, then - assertThatThrownBy(() -> postService.postClosedEarlyById(findedPost.getId(), MemberFixtures.MALE_30.get())) + assertThatThrownBy(() -> postService.postClosedEarlyById(foundPost.getId(), MemberFixtures.MALE_30.get())) .isInstanceOf(BadRequestException.class) .hasMessage("해당 게시글 작성자가 아닙니다."); } @@ -391,10 +391,10 @@ void throwExceptionDeadLinePostClosedEarly() { .build() ); - Post findedPost = postRepository.findById(post.getId()).get(); + Post foundPost = postRepository.findById(post.getId()).get(); // when, then - assertThatThrownBy(() -> postService.postClosedEarlyById(findedPost.getId(), writer)) + assertThatThrownBy(() -> postService.postClosedEarlyById(foundPost.getId(), writer)) .isInstanceOf(BadRequestException.class) .hasMessage("게시글이 이미 마감되었습니다."); } @@ -413,10 +413,10 @@ void throwExceptionHalfDeadLinePostClosedEarly() { .build() ); - Post findedPost = postRepository.findById(post.getId()).get(); + Post foundPost = postRepository.findById(post.getId()).get(); // when, then - assertThatThrownBy(() -> postService.postClosedEarlyById(findedPost.getId(), writer)) + assertThatThrownBy(() -> postService.postClosedEarlyById(foundPost.getId(), writer)) .isInstanceOf(BadRequestException.class) .hasMessage("게시글이 마감 시간까지 절반의 시간 이상이 지나지 않으면 조기마감을 할 수 없습니다."); }