-
Notifications
You must be signed in to change notification settings - Fork 107
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
[로또] 장유범 미션 제출합니다. #83
Open
yrsel
wants to merge
17
commits into
woowacourse-precourse:main
Choose a base branch
from
yrsel:yrsel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
ExceptionCode.kt : 예외에 맞는 메시지 반환 LottoException.kt : 상위 예외를 상속받은 커스텀 예외 클래스 LottoExceptionTest.kt : 예외 문구 테스트 진행
PurchaseAmountValidator: 구입 금액에 대한 검증 PurchaseAmountValidatorTest: 구입 금액에 대한 테스트
NumberGenerator.kt: 유연성을 제공하기 위한 인터페이스 RandomNumberGenerator.kt: 랜덤 로또번호 생성기
생성자의 접근자 수정, 메서드를 통해 데이터 전달
LottoValidator.kt: 로또 객체 생성 시 검증 담당 Lotto.kt: 루트 패키지 -> domain/lotto 패키지 이동
RuntimeException이 아닌 IllegalArgumentException 을 호출할 수 있도록 변경
LottoArgumentConverter.kt: 로또 생성자에 맞는 인자로 변환해주는 역할 LottoFactory.kt: 로또 관련된 객체를 생성해주는 생성 패턴 LottoTicket.kt: 로또 번호를 모아놓은 일급객체
LottoArgumentConverter.kt: 보너스번호 숫자로 변환 로직 추가 BonusNumber.kt: 보너스 번호 일급 객체 LottoFactory.kt: 보너스 번호 중복 검증 및 보너스 번호 객체 생성
LottoRank.kt: 당첨 관련 정보 모음 WinningManager.kt: 로또 결과를 반환 WinningStatistics.kt: 로또 결과에 대한 계산 처리 MatchedInfoDto.kt: 로또 하나 마다 맞춘 개수와 보너스 데이터 묶음 전달용도
ApplicationTest에서의 예외테스트에서 ERROR_MESSAGE를 비교해야하는데 예외 발생 후 Console 버퍼에 쌓여있는 메시지를 flush 해주지 못해서 아무런 값도 입력되지 않은 상태가 무한 반복되어 No line found 에러 메시지만 쌓이다가 Stackoverflow 발생 이러한 예외 테스트를 위해서 예외 발생하고나서 강제로 readLine을 한번더 호출해줘서 flush 해주도록 하였다.
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.