Open
Conversation
choheejin
reviewed
Nov 26, 2023
| * 무작위 값을 발생시켜 4보다 크면 전진 합니다. | ||
| */ | ||
| public void move() { | ||
| int number = Randoms.pickNumberInRange(0, 9); |
Comment on lines
+35
to
+39
| public static void validateBlank(String input) { | ||
| if(input == null || input.equals("")) { | ||
| throw new IllegalArgumentException(ErrorMessage.BLANK.getMessage()); | ||
| } | ||
| } |
There was a problem hiding this comment.
input.isBlank()를 이용하여 보다 쉽게 검증할 수 있을거 같아요!
There was a problem hiding this comment.
제가 프리코스를 하면서 받은 피드백 중 하나인데요.
Validate 클래스를 이용하여 검증 코드를 하나로 모아 가독성을 높일 수 있지만,
보다 큰 프로젝트를 구성하게 될 때, 검증 코드를 하나의 클래스로 모으게 된다면 클래스가 너무 무거워질 것 같다는 피드백을 받았었습니다.
이에 대해서 동언님은 어떻게 생각하시나요?
Owner
Author
There was a problem hiding this comment.
프로젝트가 커지면 Validate를 여러 개로 나눌 거 같습니다.
어떤게 좋은 방법일까요?
There was a problem hiding this comment.
3주차 피드백에서 단위 테스트하기 어려운 코드를 단위 테스트하기 부분에
https://tecoble.techcourse.co.kr/post/2020-05-07-appropriate_method_for_test_by_parameter/
이 포스트를 읽으신다면 해당 피드백을 적용할 수 있을것 같아요!
Owner
Author
There was a problem hiding this comment.
좋은 자료 공유 감사합니다!! 정독해보겠습니다.
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.
No description provided.