Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: 학년도와 학기 상수 분리 #771

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

Sangwook02
Copy link
Member

@Sangwook02 Sangwook02 commented Sep 11, 2024

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • 과거에는 리쿠르팅 관련 test들만 학년도와 학기 상수를 사용했지만, 현재는 스터디 등 다른 도메인에서도 사용합니다.
  • RecruitmentConstant에 있던 학년도와 학기 상수를 TemporalConstant로 옮겼습니다.

📝 참고사항

  • 기존 SemesterConstantTemporalConstant로 rename 했습니다.

📚 기타

Summary by CodeRabbit

  • New Features

    • 새로운 TemporalConstant 클래스를 추가하여 시간 관련 상수를 정의함으로써 테스트의 일관성과 접근성을 향상시켰습니다.
    • RecruitmentConstant에서 학년 및 학기 관련 상수를 제거하고, 수수료 관련 상수를 추가했습니다.
  • Bug Fixes

    • 기존 테스트에서 사용되던 SemesterConstantTemporalConstant로 교체하여 시간 관련 로직의 유효성을 개선했습니다.
  • Chores

    • 여러 테스트 파일에서 SemesterConstant의 사용을 제거하고 TemporalConstant를 추가하여 코드 의존성을 정리했습니다.

@Sangwook02 Sangwook02 added the ✅ test 테스트 작업 label Sep 11, 2024
@Sangwook02 Sangwook02 self-assigned this Sep 11, 2024
@Sangwook02 Sangwook02 requested a review from a team as a code owner September 11, 2024 06:31
Copy link

coderabbitai bot commented Sep 11, 2024

Walkthrough

이 변경 사항은 RecruitmentConstant에서 학년도 및 학기 관련 상수를 제거하고, 새로운 TemporalConstant 클래스를 도입하여 시간 관련 상수를 정의하는 작업을 포함합니다. 여러 테스트 파일에서 SemesterConstantTemporalConstant로 교체하여 상수의 사용을 일관되게 하였으며, 관련 테스트의 접근성을 향상시켰습니다.

Changes

파일 경로 변경 요약
src/test/java/com/gdschongik/gdsc/domain/member/... MemberValidatorTest.java, MembershipServiceTest.javaTemporalConstant 추가
src/test/java/com/gdschongik/gdsc/domain/membership/... MembershipTest.java, MembershipValidatorTest.java, AdminRecruitmentServiceTest.java에서 SemesterConstantTemporalConstant로 변경
src/test/java/com/gdschongik/gdsc/domain/order/... OrderServiceTest.javaTemporalConstant 추가
src/test/java/com/gdschongik/gdsc/domain/recruitment/... RecruitmentRoundValidatorTest.java, RecruitmentTest.java에서 SemesterConstantTemporalConstant로 변경
src/test/java/com/gdschongik/gdsc/domain/study/... AdminStudyServiceTest.java에서 RecruitmentConstant 제거 및 TemporalConstant 추가, StudyTest.javaTemporalConstant 추가
src/test/java/com/gdschongik/gdsc/global/common/... RecruitmentConstant.java에서 ACADEMIC_YEAR, SEMESTER_TYPE 제거, FEE, FEE_AMOUNT, FEE_NAME 추가, TemporalConstant.java 새로 추가
src/test/java/com/gdschongik/gdsc/helper/... FixtureHelper.java, IntegrationTest.java에서 SemesterConstantTemporalConstant로 변경

Assessment against linked issues

Objective Addressed Explanation
학년도와 학기 상수를 별도 상수 클래스로 분리 (#[713])

🐰 변화를 축하해요, 친구들!
시간의 상수로 새롭게 태어나,
학기와 학년도는 이제 안녕,
더 나은 테스트로 모두를 반겨요!
🥕✨


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e9e4c62 and d70aafb.

Files selected for processing (14)
  • src/test/java/com/gdschongik/gdsc/domain/member/domain/MemberValidatorTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/membership/application/MembershipServiceTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipValidatorTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/order/application/OrderServiceTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/recruitment/application/AdminRecruitmentServiceTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentRoundValidatorTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/study/application/AdminStudyServiceTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/study/domain/StudyTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/global/common/constant/RecruitmentConstant.java (2 hunks)
  • src/test/java/com/gdschongik/gdsc/global/common/constant/TemporalConstant.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java (1 hunks)
Files skipped from review due to trivial changes (12)
  • src/test/java/com/gdschongik/gdsc/domain/member/domain/MemberValidatorTest.java
  • src/test/java/com/gdschongik/gdsc/domain/membership/application/MembershipServiceTest.java
  • src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipTest.java
  • src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipValidatorTest.java
  • src/test/java/com/gdschongik/gdsc/domain/order/application/OrderServiceTest.java
  • src/test/java/com/gdschongik/gdsc/domain/recruitment/application/AdminRecruitmentServiceTest.java
  • src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentRoundValidatorTest.java
  • src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentTest.java
  • src/test/java/com/gdschongik/gdsc/domain/study/application/AdminStudyServiceTest.java
  • src/test/java/com/gdschongik/gdsc/domain/study/domain/StudyTest.java
  • src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java
  • src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java
Additional comments not posted (3)
src/test/java/com/gdschongik/gdsc/global/common/constant/TemporalConstant.java (1)

1-16: LGTM!

새로운 TemporalConstant 클래스는 학년도와 학기 관련 상수를 잘 정의하고 있습니다. 상수는 public static final로 선언되어 있으며, 클래스는 잘 구조화되어 있습니다.

src/test/java/com/gdschongik/gdsc/global/common/constant/RecruitmentConstant.java (2)

Line range hint 1-14: ACADEMIC_YEARSEMESTER_TYPE 상수 제거를 승인합니다.

RecruitmentConstant에서 ACADEMIC_YEARSEMESTER_TYPE 상수를 제거하는 것은 PR 목표와 일치합니다. 이러한 상수는 이제 전용 클래스인 TemporalConstant로 이동되었습니다.


15-18: 회비 관련 상수 추가는 리뷰에서 제외합니다.

FEE, FEE_AMOUNTFEE_NAME 상수의 추가는 PR 목표와 관련이 없습니다. 그러나 이러한 변경 사항은 어떠한 문제도 발생시키지 않습니다.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link
Member

@uwoobeat uwoobeat left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@AlmondBreez3 AlmondBreez3 left a comment

Choose a reason for hiding this comment

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

lgtm

@Sangwook02 Sangwook02 merged commit 15be25e into develop Sep 12, 2024
1 check passed
@Sangwook02 Sangwook02 deleted the test/713-relocate-year-and-semester branch September 12, 2024 06:23
Copy link
Contributor

@seulgi99 seulgi99 left a comment

Choose a reason for hiding this comment

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

LGTM 고생하셨습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ test 테스트 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✅ 학년도와 학기 상수를 별도 상수 클래스로 분리
4 participants