refactor(clean-code): goodcode 학습 테스트에 @Nested 카테고리 그룹화 적용#13
Merged
jaeyeonling merged 4 commits intocho-log:mainfrom Apr 6, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces structural improvements to the test suite by organizing test cases into nested classes for better readability and logical grouping. Additionally, a new file was incorrectly added to the tmp directory. I have provided feedback to remove this temporary file to maintain project cleanliness.
| @@ -0,0 +1,490 @@ | |||
| package cholog.goodcode; | |||
jaeyeonling
approved these changes
Apr 6, 2026
| if (power <= 4) { | ||
| return; | ||
| @Nested | ||
| @DisplayName("Command-Query Separation") |
Contributor
There was a problem hiding this comment.
여기 DisplayName만 영어인데, 의도된 것이 맞을까요?
Contributor
Author
There was a problem hiding this comment.
넵 의도된 것 맞습니다.
한번 한글 네이밍 고민을 해봤는데, "명령-조회 분리"가 어색하다고 느껴져서 Command-Query Separation 으로 작성했습니다!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
clean-code모듈의 goodcode 패키지 테스트 3개(ReadableCodeTest,PredictableCodeTest,AvoidMistakeCodeTest)에@Nested를 적용하여 학습 카테고리별로 그룹화합니다.배경
다른 학습 테스트들은 모두
@Nested로 그룹화되어 있으나, goodcode 테스트들은@Nested없이 테스트가 순차적으로 나열되어 있어 처음 학습할 때 어려움이 있었습니다.의도된 구조인지 고민해봤지만, 테스트들이 일정한 카테고리로 분류될 수 있다고 판단했고, 카테고리화할 경우 학습 효과가 높아질 것으로 기대하여 다른 테스트와 동일하게
@Nested를 적용했습니다.특히 goodcode 패키지는 실패하는 테스트를 통과시키는 다른 학습 테스트들과 달리, 같은 주제에 대해 단계적으로 개선되는 구조를 보여주고 있었습니다. 이러한 특성상 카테고리화가 더욱 필요하다고 판단했습니다.
잘못 파악한 부분이 있다면 피드백 부탁드립니다.
카테고리 분류
ReadableCodeTest (읽기 좋은 코드) — 5개 카테고리
PredictableCodeTest (예측 가능한 코드) — 4개 카테고리
AvoidMistakeCodeTest (실수를 방지하는 코드) — 3개 카테고리
변경 범위
initial/,complete/양쪽 동일한 구조로 적용@Nested래핑만)