[week7] 계산기 테스트코드 작성 #18
Open
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.
계산기 만들기 (MVVM + DI + Unit Test)
의존성 주입
원래는 DI Container 써볼까 했는데,, 이해가 잘 안되구,,, 시간도 부족하고 해서ㅠㅠ
SceneDelegate에서 직접 의존성 조립합니다
사칙연산만 가능합니다🥹
±,%기능은 프로토콜에는 포함하지만 사칙연산 테스트가 더 중요한 것 같아서 no-op 처리햇습니다NumberFormatter 이거 왜 있나용🤔
1,000 → 1000)로 테스트 비교 문자열을 항상 일정하게 유지하기 위해서 넣었습니다...(지금 생각해보니 여기다말고 다른데 빼는 게 이쁠 것 같네요)🧪 CalculatorService Unit Test
displayText에 올바른 결과가 나오는지만 검증