feature/KD-75 : 졸업대상자 상세조회시 phon컬럼 조회로직 추가#335
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Walkthrough
Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Test Coverage Report
Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## develop #335 +/- ##
=============================================
+ Coverage 85.38% 85.52% +0.14%
Complexity 79 79
=============================================
Files 24 24
Lines 301 304 +3
Branches 30 30
=============================================
+ Hits 257 260 +3
Misses 22 22
Partials 22 22
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
aics-admin/src/testFixtures/java/graduationUser/application/GraduationUserAdminFacadeTest.java (1)
277-287: 사용자 미존재 예외 경로 테스트도 추가해두면 더 안전합니다.Line 282 경로는 이제
UserQueryService에 의존하므로, 연결된User가 없을 때의 동작(예외)을 고정해두는 테스트를 권장합니다.테스트 추가 예시
+import kgu.developers.domain.user.exception.UserNotFoundException; +import static org.junit.jupiter.api.Assertions.assertThrows; + +@Test +@DisplayName("getGraduationUserById는 연결된 User가 없으면 예외를 던진다.") +void getGraduationUserById_UserNotFound() { + // given + Long graduationUserId = 2L; // fixture 상 userId=202411002, User 미시드 상태 + + // when & then + assertThrows(UserNotFoundException.class, + () -> graduationUserAdminFacade.getGraduationUserById(graduationUserId)); +}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@aics-admin/src/testFixtures/java/graduationUser/application/GraduationUserAdminFacadeTest.java` around lines 277 - 287, Add a negative test for the user-not-found path when calling GraduationUserAdminFacade.getGraduationUserById: create a new test method in GraduationUserAdminFacadeTest (e.g., getGraduationUserById_UserNotFound_ThrowsException) that mocks UserQueryService to simulate a missing User (return empty/throw the repository's user-not-found exception) and then assertThrows the expected exception type (e.g., UserNotFoundException or the actual domain NotFound exception) when invoking graduationUserAdminFacade.getGraduationUserById(graduationUserId); ensure the test references the same fixtures used by getGrduationUserById_Success and verifies the facade's error path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@aics-admin/src/testFixtures/java/graduationUser/application/GraduationUserAdminFacadeTest.java`:
- Around line 277-287: Add a negative test for the user-not-found path when
calling GraduationUserAdminFacade.getGraduationUserById: create a new test
method in GraduationUserAdminFacadeTest (e.g.,
getGraduationUserById_UserNotFound_ThrowsException) that mocks UserQueryService
to simulate a missing User (return empty/throw the repository's user-not-found
exception) and then assertThrows the expected exception type (e.g.,
UserNotFoundException or the actual domain NotFound exception) when invoking
graduationUserAdminFacade.getGraduationUserById(graduationUserId); ensure the
test references the same fixtures used by getGrduationUserById_Success and
verifies the facade's error path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5d720c57-7bac-4044-834b-c3a5c5d3423b
📒 Files selected for processing (3)
aics-admin/src/main/java/kgu/developers/admin/graduationUser/application/GraduationUserAdminFacade.javaaics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserDetailResponse.javaaics-admin/src/testFixtures/java/graduationUser/application/GraduationUserAdminFacadeTest.java
...src/main/java/kgu/developers/admin/graduationUser/application/GraduationUserAdminFacade.java
Outdated
Show resolved
Hide resolved
JangYeongHu
left a comment
There was a problem hiding this comment.
LGTM~! 리뷰만 한번 확인해주시면 좋을 것 같아요
Summary
해당 PR에 대한 요약을 작성해주세요.
졸업대상자를 조회하면 phon 컬럼도 조회 되도록 수정했습니다.
Tasks
GraduationUserDetailResponse에 phon 필드 추가
GraduationUserAdminFacade에서 user조회 로직 추가
GraduationUserQueryServiceTest 수정
To Reviewer
(없을 경우 삭제) 더 전달할 내용이 있다면 여기에 작성해주세요.
Screenshot
(없을 경우 삭제) 작업한 내용에 대한 스크린샷을 첨부해주세요.