Skip to content

Commit

Permalink
[#22] chore: 테스트 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeuk520 committed Sep 5, 2024
1 parent ef8a148 commit 4a688e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/test/java/com/ku/covigator/domain/CourseTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.ku.covigator.domain;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

Expand All @@ -21,7 +20,7 @@ void test() {
course.updateAvgScore(4);

//then
assertEquals(course.getReviewCnt(), 6L);
assertEquals(course.getAvgScore(), 4.0);
assertEquals(6L, course.getReviewCnt());
assertEquals(4.0, course.getAvgScore());
}
}
4 changes: 2 additions & 2 deletions src/test/java/com/ku/covigator/service/ReviewServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ void updateCourseWhenReviewAdded() {
//then
Course findCourse = courseRepository.findById(savedCourse.getId()).get();
assertAll(
() -> assertEquals(findCourse.getReviewCnt(), 1L),
() -> assertEquals(findCourse.getAvgScore(), 5.0)
() -> assertEquals(1L, findCourse.getReviewCnt()),
() -> assertEquals(5.0, findCourse.getAvgScore())
);
}

Expand Down

0 comments on commit 4a688e3

Please sign in to comment.