Conversation
Yeonnies
approved these changes
Dec 26, 2025
Collaborator
Yeonnies
left a comment
There was a problem hiding this comment.
항상 자세한 PR 감사합니다!
뷰모델, 서비스 계층을 분리하신 이유가 궁금해요!
그리고 뷰모델도 테스트 해보심 조을 거 같아요..
--편지--
언니는 진짜 해야.. 보고있으면 넘 따뜻하고 위안이 돼..
테스트코드 스터디에 와줘서 고마어.. 내가 잘 한지 잘 몰겠는데 언니가 많이 배워갔음 조켓어
솔플리에 테스트코드 리드는 꼭 언니여야해 아랏지??
항상 열심히 PR 작성해주고 노션에서도 예시 들어가면서 설명해주는 거 보면서
진짜 선생님 같다고 느꼈어.. 맨날 발표시키고 싶었어.. 최고야..
|
|
||
| final class CalculatorServiceTests: XCTestCase { | ||
|
|
||
| func test_add() { |
|
|
||
| final class CalculatorViewController: UIViewController { | ||
|
|
||
| private let viewModel: CalculatorViewModel |
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.
계산기 만들기 (MVVM + DI + Unit Test)
의존성 주입
원래는 DI Container 써볼까 했는데,, 이해가 잘 안되구,,, 시간도 부족하고 해서ㅠㅠ
SceneDelegate에서 직접 의존성 조립합니다
사칙연산만 가능합니다🥹
±,%기능은 프로토콜에는 포함하지만 사칙연산 테스트가 더 중요한 것 같아서 no-op 처리햇습니다NumberFormatter 이거 왜 있나용🤔
1,000 → 1000)로 테스트 비교 문자열을 항상 일정하게 유지하기 위해서 넣었습니다...(지금 생각해보니 여기다말고 다른데 빼는 게 이쁠 것 같네요)🧪 CalculatorService Unit Test
displayText에 올바른 결과가 나오는지만 검증