[Koin Project][Chore] 일부 Usecase에 대한 테스트 작성#1261
Merged
kongwoojin merged 8 commits intodevelopfrom Feb 22, 2026
Merged
Conversation
KYM-P
approved these changes
Feb 8, 2026
Collaborator
KYM-P
left a comment
There was a problem hiding this comment.
좋은 것 같습니다!
다만 좋은 test 는 여러가지 경우에서도 잘 동작하는지 검증하는 test 이므로
여러 case 들을 넣어 검증하면 더 좋을 거 같습니다.
|
|
||
| Assert.assertNull(result.first) | ||
| Assert.assertNotNull(result.second) | ||
| Assert.assertFalse(result.second!!.isSuccess) |
Collaborator
There was a problem hiding this comment.
second가 UserErrorHandler 인 경우의 타입 비교 검증은 필요 없으려나요?
Member
Author
There was a problem hiding this comment.
second가 UserErrorHandler가 아닐 수는 없어서 별도의 검증은 필요하지 않을 것 같습니다.
| fun `비밀번호에 영어가 포함되었는가`() { | ||
| val password = "password" | ||
| val result = VerifyPasswordFormatUseCase().invoke(password) | ||
| assertTrue(result.isIncludeEnglish) |
Collaborator
There was a problem hiding this comment.
영어가 아닌 case 의 경우 false 를 반환하는 검증도 있으면 좋을 거 같아요
| fun `비밀번호에 숫자가 포함되었는가`() { | ||
| val password = "password123" | ||
| val result = VerifyPasswordFormatUseCase().invoke(password) | ||
| assertTrue(result.isIncludeNumber) |
Collaborator
There was a problem hiding this comment.
요것도 false 가 나오는 case 도 있으면 좋을 거 같아요
| fun `비밀번호에 기호가 포함되었는가`() { | ||
| val password = "password!" | ||
| val result = VerifyPasswordFormatUseCase().invoke(password) | ||
| assertTrue(result.isIncludeSymbol) |
| fun `비밀번호 길이가 6에서 18자가 아닐 경우`() { | ||
| val password = "pass" | ||
| val result = VerifyPasswordFormatUseCase().invoke(password) | ||
| assertFalse(result.isValidLength) |
Collaborator
There was a problem hiding this comment.
이것도 true 의 case 도 만들면 좋겠네요
또한 경계값인 6자, 18 자 부분의 테스트도 넣으면 좋을 듯 합니다.
이상, 이하의 코딩이 잘못 되었을 수도 있으니까요
KYM-P
approved these changes
Feb 22, 2026
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.
PR 개요
PR 체크리스트
작업사항
작업사항의 상세한 설명
UserLoginUseCase,VerifyPasswordFormatUseCase그리고GetNearbyShopUseCase에 대한 테스트 코드를 작성했습니다.VerifyPasswordFormatUseCaseUserLoginUseCaseGetNearbyShopUseCase논의 사항
스크린샷
추가내용