Skip to content

Comments

test: User, 인증서, JPARegisteredClient(Custom) 객체들에 대한 Unit 테스트 코드 작성 / #58#59

Merged
JayongLee merged 3 commits intomainfrom
test/#58
Dec 2, 2025
Merged

test: User, 인증서, JPARegisteredClient(Custom) 객체들에 대한 Unit 테스트 코드 작성 / #58#59
JayongLee merged 3 commits intomainfrom
test/#58

Conversation

@JayongLee
Copy link
Member

🗞️ 연관된 이슈

🔥 이슈번호

✅ 작업 내용

  • User, 인증서, JPARegisteredClient(Custom) 객체들에 대한 Unit 테스트 코드 작성

📸 스크린샷 (선택)

체크리스트 ✅

  • 코드가 정상적으로 컴파일되나요?
  • merge할 브랜치의 위치를 확인했나요?
  • 테스트 코드를 작성하셨나요?

기타

@JayongLee JayongLee self-assigned this Dec 2, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @JayongLee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 사용자 관리, 인증서 처리 및 OAuth2 클라이언트/권한 부여 관리와 관련된 핵심 서비스에 대한 포괄적인 단위 테스트를 도입합니다. 이는 코드 커버리지를 크게 향상시키고 이러한 중요한 구성 요소의 신뢰성을 보장합니다.

Highlights

  • CertificateService 단위 테스트 추가: 인증서 발급, 인증 및 일련번호 조회 로직에 대한 단위 테스트가 추가되어 CertificateService의 신뢰성을 높였습니다.
  • JpaRegisteredClientRepositoryService 단위 테스트 추가: OAuth2 RegisteredClient 객체의 저장 및 조회 기능에 대한 단위 테스트를 도입하여 JpaRegisteredClientRepositoryService의 정확성을 보장합니다.
  • JpaOAuth2AuthorizationService 단위 테스트 추가: OAuth2 Authorization 객체의 저장 및 토큰 기반 조회 기능에 대한 단위 테스트를 추가하여 JpaOAuth2AuthorizationService의 견고성을 강화했습니다.
  • UserService 단위 테스트 추가: 사용자 등록, 중복 전화번호 처리, ID 기반 사용자 조회 및 전체 사용자 목록 조회 기능에 대한 단위 테스트를 추가하여 UserService의 안정성을 확보했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@JayongLee JayongLee linked an issue Dec 2, 2025 that may be closed by this pull request
1 task
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

전반적으로 User, Certificate, JPARegisteredClient 관련 서비스 및 리포지토리 계층에 대한 단위 테스트를 충실하게 작성해주셨습니다. 테스트 케이스들은 주요 기능들을 잘 پوشش하고 있으며, Mockito와 AssertJ를 효과적으로 사용하여 의도를 명확하게 드러내고 있습니다.

몇 가지 테스트에서 LocalDateTime.now()Instant.now()를 사용하여 현재 시각에 의존하는 부분이 발견되었습니다. 이는 테스트 실행 시점에 따라 결과가 달라질 수 있는 비결정적 테스트로 이어질 수 있으므로, 일관성 있고 재현 가능한 테스트를 위해 고정된 시간 값을 사용하도록 수정하는 것을 제안드렸습니다.

작성해주신 테스트 코드 덕분에 시스템의 안정성이 크게 향상될 것으로 기대됩니다. 좋은 기여 감사합니다.

@JayongLee JayongLee merged commit b8ca5f4 into main Dec 2, 2025
1 check passed
@JayongLee JayongLee deleted the test/#58 branch December 2, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: unit test코드 작성

1 participant