Conversation
- `LoginUseCase`의 비즈니스 로직 검증을 위한 `LoginUseCaseTest` 클래스 추가 - 로그인 타입(Email, Kakao, Google)에 따른 올바른 Repository 메서드 호출 여부 검증 - 로그인 성공 시 반환된 토큰의 세션 저장 로직 및 신규 가입자 여부(`isNewUser`) 반환 확인 - 로그인 실패 시 세션 저장을 생략하고 에러를 즉시 반환하는 단락 평가(short-circuit) 로직 검증 - 외부 라이브러리(MockK 등) 없이 직접 구현한 `FakeAuthRepository`를 사용하여 테스트 수행
- `ResolveMemorialMediaForSaveUseCase`의 비즈니스 로직 및 예외 처리 시나리오 검증을 위한 테스트 클래스 생성 - 영상 및 사진의 업로드 결과(`VideoUploadOutcome`, `PhotoUploadOutcome`)에 따른 URL 매핑 로직(Empty, Existing, FreshlyUploaded) 확인 - 영상 처리 실패 시 `MemorialVideoSaveException`으로 래핑하고 사진 처리 로직을 실행하지 않는 Short-circuit 로직 검증 - 사진 처리 실패 시 `MemorialPhotoSaveException`으로 래핑 및 원본 예외(`cause`) 보존 여부 확인 - 외부 라이브러리(mockk 등) 없이 직접 구현한 Fake Repository를 사용하여 호출 인자 및 횟수 검증
…ut 적용 - 기존 개별 URL 및 URI 파라미터를 `MediaInput`(Local, Remote, None) 타입으로 통합하여 UseCase 인터페이스 단순화 - `MemorialVideoUploadRepository` 및 `MemorialPhotoUploadRepository`가 `MediaInput`을 직접 수신하도록 변경 - 인터페이스 변경에 따라 테스트용 `Fake` 저장소 및 `ResolveMemorialMediaForSaveUseCaseTest` 코드 마이그레이션 - 미디어 소스(로컬/원격) 판별 책임 소재 변경에 따른 테스트 주석 및 검증 로직 업데이트
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.
📌𝘐𝘴𝘴𝘶𝘦𝘴
Closes #349 — test(domain): UseCase 단위 테스트 추가 — LoginUseCase + ResolveMemorialMediaForSaveUseCase
📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯
LoginUseCaseTest— LoginUseCase 단위 테스트 신규 (35adab4)ResolveMemorialMediaForSaveUseCaseTest— 단위 테스트 신규 (be11b75) + develop 의 MediaInput 도입에 맞춰 invoke 인자·fake repository 시그니처 재작성 (e453fdf)📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵
UI 변경 없음 — 도메인 UseCase JVM 단위 테스트.
💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴
ResolveMemorialMediaForSaveUseCaseTest는 develop 의 MediaInput 도입(영상·사진 입력을 sealedMediaInput으로 확정)을 반영 — invoke 가(video: MediaInput, photo: MediaInput), fake repository 가resolve*(input: MediaInput)으로 변경:core:domain:testDebugUnitTest+:feature:afternote:domain:testDebugUnitTestBUILD SUCCESSFUL, ktlint 통과