|
1 | 1 | package com.somemore.domains.review.service; |
2 | 2 |
|
| 3 | +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.COUNSELING; |
| 4 | +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.CULTURAL_EVENT; |
| 5 | +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.OTHER; |
| 6 | +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; |
| 7 | +import static com.somemore.global.auth.oauth.domain.OAuthProvider.NAVER; |
| 8 | +import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_REVIEW; |
| 9 | +import static com.somemore.support.fixture.CenterFixture.createCenter; |
| 10 | +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; |
| 11 | +import static org.assertj.core.api.Assertions.assertThat; |
| 12 | +import static org.assertj.core.api.Assertions.assertThatThrownBy; |
| 13 | +import static org.assertj.core.api.AssertionsForClassTypes.tuple; |
| 14 | + |
3 | 15 | import com.somemore.domains.center.domain.Center; |
4 | 16 | import com.somemore.domains.center.repository.center.CenterRepository; |
5 | 17 | import com.somemore.domains.recruitboard.domain.RecruitBoard; |
|
16 | 28 | import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; |
17 | 29 | import com.somemore.global.exception.NoSuchElementException; |
18 | 30 | import com.somemore.support.IntegrationTestSupport; |
| 31 | +import java.util.List; |
| 32 | +import java.util.UUID; |
19 | 33 | import org.junit.jupiter.api.BeforeEach; |
20 | 34 | import org.junit.jupiter.api.DisplayName; |
21 | 35 | import org.junit.jupiter.api.Test; |
|
25 | 39 | import org.springframework.data.domain.Pageable; |
26 | 40 | import org.springframework.data.domain.Sort; |
27 | 41 |
|
28 | | -import java.util.List; |
29 | | -import java.util.UUID; |
30 | | - |
31 | | -import static com.somemore.domains.recruitboard.domain.VolunteerCategory.*; |
32 | | -import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; |
33 | | -import static com.somemore.global.auth.oauth.domain.OAuthProvider.NAVER; |
34 | | -import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_REVIEW; |
35 | | -import static com.somemore.support.fixture.CenterFixture.createCenter; |
36 | | -import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; |
37 | | -import static org.assertj.core.api.Assertions.assertThat; |
38 | | -import static org.assertj.core.api.Assertions.assertThatThrownBy; |
39 | | -import static org.assertj.core.api.AssertionsForClassTypes.tuple; |
40 | | - |
41 | 42 | class ReviewQueryServiceTest extends IntegrationTestSupport { |
42 | 43 |
|
43 | 44 | @Autowired |
@@ -145,11 +146,9 @@ void getReviewsByVolunteerId() { |
145 | 146 | volunteerApplyRepository.saveAll(List.of(apply1, apply2)); |
146 | 147 |
|
147 | 148 | Review review1 = createReview(apply1.getId(), volunteerId, "제 인생 최고의 봉사활동", |
148 | | - "정말 유익했습니다. 더보기..", |
149 | | - "https://image.domain.com/links1"); |
| 149 | + "정말 유익했습니다. 더보기.."); |
150 | 150 | Review review2 = createReview(apply2.getId(), volunteerId, "보람있는 봉사활동", |
151 | | - "많은 사람들에게 도움을 주었어요.", |
152 | | - "https://image.domain.com/links2"); |
| 151 | + "많은 사람들에게 도움을 주었어요."); |
153 | 152 | reviewRepository.saveAll(List.of(review1, review2)); |
154 | 153 |
|
155 | 154 | ReviewSearchCondition conditionWithoutCategory = ReviewSearchCondition.builder() |
@@ -195,11 +194,9 @@ void getReviewsByCenterId() { |
195 | 194 | volunteerApplyRepository.saveAll(List.of(apply1, apply2)); |
196 | 195 |
|
197 | 196 | Review review1 = createReview(apply1.getId(), volunteer1.getId(), "제 인생 최고의 봉사활동", |
198 | | - "정말 유익했습니다. 더보기..", |
199 | | - "https://image.domain.com/links1"); |
| 197 | + "정말 유익했습니다. 더보기.."); |
200 | 198 | Review review2 = createReview(apply2.getId(), volunteer2.getId(), "보람있는 봉사활동", |
201 | | - "많은 사람들에게 도움을 주었어요.", |
202 | | - "https://image.domain.com/links2"); |
| 199 | + "많은 사람들에게 도움을 주었어요."); |
203 | 200 | reviewRepository.saveAll(List.of(review1, review2)); |
204 | 201 |
|
205 | 202 | ReviewSearchCondition condition = ReviewSearchCondition.builder() |
@@ -232,8 +229,7 @@ private Review createReview(Long applyId, UUID volunteerId) { |
232 | 229 | .build(); |
233 | 230 | } |
234 | 231 |
|
235 | | - private Review createReview(Long applyId, UUID volunteerId, String title, String content, |
236 | | - String imgUrl) { |
| 232 | + private Review createReview(Long applyId, UUID volunteerId, String title, String content) { |
237 | 233 | return Review.builder() |
238 | 234 | .volunteerApplyId(applyId) |
239 | 235 | .volunteerId(volunteerId) |
|
0 commit comments