-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] test: 도메인 연관관계 재설정 후 테스트 작성 (#101)
* test: 리뷰어 그룹 테스트 작성 * refactor: 리뷰 작성 테스트를 `ReviewTest`로 이동 * test: 리뷰어 중복 추가 테스트 * refactor: Test Fixture 사용하도록 수정 * refactor: 예외 클래스명 통일 * style: 테스트 개행 * refactor: 테스트명 명확하게 수정 * refactor: 회원 도메인에서의 비교를 GithubId로 진행하도록 수정 * refactor: createdAt 사용하지 않고, deadline으로 수정 * refactor: 필드명 reviewerGithubIds로 통일 * test: 리뷰어 중복 생성 검증 * refactor: reviewer/reviewee 통일 * refactor: 리뷰어-리뷰이 github id를 명시 * refactor: 테스트에 하나의 검증만 진행되도록 수정
- Loading branch information
Showing
9 changed files
with
214 additions
and
20 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
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
26 changes: 26 additions & 0 deletions
26
backend/src/test/java/reviewme/fixture/ReviewerGroupFixture.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,26 @@ | ||
package reviewme.fixture; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import reviewme.member.domain.GithubId; | ||
import reviewme.member.domain.Member; | ||
import reviewme.member.domain.ReviewerGroup; | ||
|
||
@RequiredArgsConstructor | ||
@Getter | ||
public enum ReviewerGroupFixture { | ||
|
||
데드라인_남은_그룹("데드라인 이전 그룹", "설명", LocalDateTime.now().plusDays(1)), | ||
데드라인_지난_그룹("데드라인 지난 그룹", "설명", LocalDateTime.now().minusDays(1)), | ||
; | ||
|
||
private final String groupName; | ||
private final String description; | ||
private final LocalDateTime deadline; | ||
|
||
public ReviewerGroup create(Member reviewee, List<GithubId> reviewerGithubIds) { | ||
return new ReviewerGroup(reviewee, reviewerGithubIds, groupName, description, deadline); | ||
} | ||
} |
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