-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 러너 식별자 값으로 러너 게시글 카운트 쿼리 작성 * refactor: secret 업데이트 * feat: Supporter 와 관련된 게시글 수 조회 repository 구현 * feat: RunnerId 와 ReviewStatus 로 러너 게시글 조회 service 구현 * feat: RunnerId 와 reviewStatus 로 로그인 된 러너의 게시글 개수 조회 api 구현 * test: 로그인한 러너와 관련된 러너 게시글 개수 조회 인수 테스트 * test: 러너와 연관된 러너 게시글 개수 조회 rest docs 테스트 * refactor: SupporterRunnerPostRepository 관련 코드 정리 * test: supporter 테스트 파일 구조 변경 * feat: 서포터 식별자 값으로 러너 게시글 개수 조회 서비스 로직 구현 * feat: 서포터 식별자 값으로 러너 게시글 개수 조회 api 구현 * test: 서포터 관련 러너 게시글 개수 조회 인수 테스트 * test: 로그인한 서포터 관련 러너 게시글 개수 조회 api 테스트 * test: 잘못된 테스트 수정 * test: 서포터가 리뷰 완료한 러너 게시글 개수 조회 api 테스트 * refactor: 서브 모듈 업데이트 * refactor: reference 타입을 primitive 타입으로 변경
- Loading branch information
Showing
28 changed files
with
1,073 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
...va/touch/baton/domain/member/command/repository/SupporterRunnerPostCommandRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
.../touch/baton/assure/runnerpost/query/count/runner/RunnerPostCountByRunnerAssuredTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package touch.baton.assure.runnerpost.query.count.runner; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import touch.baton.assure.runnerpost.support.command.RunnerPostCreateSupport; | ||
import touch.baton.assure.runnerpost.support.query.count.runner.RunnerPostCountByRunnerSupport; | ||
import touch.baton.config.AssuredTestConfig; | ||
import touch.baton.config.infra.auth.oauth.authcode.FakeAuthCodes; | ||
import touch.baton.domain.runnerpost.command.vo.ReviewStatus; | ||
import touch.baton.domain.runnerpost.query.controller.response.RunnerPostResponse; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
import static touch.baton.assure.runnerpost.support.command.RunnerPostCreateSupport.러너_게시글_생성_요청; | ||
import static touch.baton.assure.runnerpost.support.query.count.runner.RunnerPostCountByRunnerSupport.러너_게시글_개수_응답; | ||
|
||
@SuppressWarnings("NonAsciiCharacters") | ||
class RunnerPostCountByRunnerAssuredTest extends AssuredTestConfig { | ||
|
||
@Test | ||
void 로그인한_러너와_연관된_러너_게시글_개수_조회에_성공한다() { | ||
// given | ||
final String 디투_액세스_토큰 = oauthLoginTestManager.소셜_회원가입을_진행한_후_액세스_토큰을_반환한다(FakeAuthCodes.ditooAuthCode()); | ||
final String 헤나_액세스_토큰 = oauthLoginTestManager.소셜_회원가입을_진행한_후_액세스_토큰을_반환한다(FakeAuthCodes.hyenaAuthCode()); | ||
러너_게시글_생성에_성공한다(디투_액세스_토큰); | ||
러너_게시글_생성에_성공한다(헤나_액세스_토큰); | ||
|
||
// when | ||
final RunnerPostResponse.Count 기대된_러너_게시글_개수 = 러너_게시글_개수_응답(1); | ||
|
||
// then | ||
RunnerPostCountByRunnerSupport | ||
.클라이언트_요청() | ||
.액세스_토큰으로_로그인한다(디투_액세스_토큰) | ||
.리뷰_상태로_로그인한_러너와_연관된_러너_게시글_개수를_조회한다(ReviewStatus.NOT_STARTED) | ||
|
||
.서버_응답() | ||
.로그인한_러너와_연관된_러너_게시글_개수_조회_성공을_검증한다(기대된_러너_게시글_개수); | ||
} | ||
|
||
private void 러너_게시글_생성에_성공한다(final String 액세스_토큰) { | ||
RunnerPostCreateSupport | ||
.클라이언트_요청() | ||
.액세스_토큰으로_로그인한다(액세스_토큰) | ||
.러너_게시글_등록_요청한다( | ||
러너_게시글_생성_요청( | ||
"테스트용_러너_게시글_제목", | ||
List.of("자바", "스프링"), | ||
"https://test-pull-request.com", | ||
LocalDateTime.now().plusHours(100), | ||
"테스트용_러너_게시글_구현_내용", | ||
"테스트용_러너_게시글_궁금한_내용", | ||
"테스트용_러너_게시글_참고_사항" | ||
) | ||
) | ||
|
||
.서버_응답() | ||
.러너_게시글_생성_성공을_검증한다(); | ||
} | ||
} |
Oops, something went wrong.