Open
Conversation
- Conditional -> Predicate
ksy90101
reviewed
Apr 15, 2025
Comment on lines
+13
to
+17
| public Ladder(int height, int width) { | ||
| for (int i = 0; i < height; i++) { | ||
| ladderRows.add(new LadderRow(width, () -> RANDOM.nextBoolean())); | ||
| } | ||
| } |
There was a problem hiding this comment.
이러면 여기에 대한 테스트가 불가할것으로 보입니다.
인터페이스를 통한 generator를 만들어서 인자로 넣는 방식을 이용하면 어떨까여?
팩터리 메서드가 나은거 같습니다!
당연히 collection이라면 forEach가 있는게 어색하지 않습닝다. getter를 만들지 않는 방법이라면 나쁘지 않을것으로 판단됩니다. |
ksy90101
requested changes
Apr 15, 2025
ksy90101
left a comment
There was a problem hiding this comment.
간단한 구조에 대한 리뷰 남겼습니다! 확인해보시면 좋을거 같습니다.
언제든지 궁금한게 있다면 DM주세요!
| throw new IllegalArgumentException("이름은 필수입니다."); | ||
| } | ||
|
|
||
| if (name.length() > 5) { |
| import static org.assertj.core.api.Assertions.assertThat; | ||
| import static org.assertj.core.api.Assertions.assertThatThrownBy; | ||
|
|
||
| public class PlayerTest { |
Comment on lines
+11
to
+18
| public Players(List<String> playerNames) { | ||
| if (playerNames == null) { | ||
| throw new IllegalArgumentException("플레이어가 존재하지 않습니다."); | ||
| } | ||
| this.players = playerNames.stream() | ||
| .map(Player::new) | ||
| .collect(Collectors.toList()); | ||
| } |
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.
질문
사다리 게임 기능 목록