Skip to content

refactor(core): UserRepositoryImpl·FakeUserRepository 를 수신자·프로필 책임별 구현·fixture 로 분리 (#1282 분리) #1738

Closed

Description

@OnlyReadOneBook

작업 유형

refactor — 동작 변경 없는 구조·책임·경계 개선

주 담당 모듈

core — 코어

개요

#1409 가 계약만 갈라 UserReceiverRepository·MyProfileRepository 를 세웠지만, 구현 UserRepositoryImpl(develop 301줄)과 공용 fake FakeUserRepository 는 여전히 17멤버 합본이다. #1282 완료 기준 «각 Repository 구현은 필요한 API/DataStore 와 세션·캐시 상태만 소유한다»·«공용 FakeUserRepository 를 책임별 test fixture 로 분리한다» 두 항목이 비어 있다.

변경 — core:data 에 UserReceiverRepositoryImpl(수신자 8멤버 + receiverRefreshRevision + 로그인 구간 귀속 목록 캐시)·MyProfileRepositoryImpl(프로필 2멤버, 상태 없음)을 신설하고 UserRepositoryImpl 은 둘에 by 위임한 채 계정·푸시 6멤버만 직접 갖는다. 좁은 구현 2종은 Hilt 가 아니라 UserRepositoryImpl 생성자가 조립해 단일 인스턴스를 보장한다. core:domain testFixtures 에 FakeUserReceiverRepository·FakeMyProfileRepository 를 신설하고 FakeUserRepository 는 위임 합본으로 남긴다. core:domain·core:data 밖은 0줄.

완료 조건

  • UserReceiverRepositoryImpl·MyProfileRepositoryImpl 이 각자 필요한 API·상태만 소유하고, UserRepositoryImpl 은 위임 + 계정·푸시 6멤버만 남는다
  • 좁은 계약으로 createReceiver 한 결과가 합본 계약 receiverListFlow 구독자에게 도달한다(같은 인스턴스 회귀 테스트)
  • FakeUserReceiverRepository·FakeMyProfileRepository 신설, FakeUserRepository 의 생성자 파라미터 22개·공개 프로퍼티·중첩 호출 기록 타입 7종·strict() 문구 보존
  • 소비자·DI 계약·fake 공개 API 무변경, core 밖 0줄
  • :core:domain:test :core:data:testDebugUnitTest 소비 모듈 unit test :app:compileDebugAndroidTestKotlin :app:assembleDebug :konsist:test ktlintCheck 통과

부모 #1282 에서 분리했다. PR #1595 가 구현한다.

참고

Metadata

Metadata

Labels

area:core공용 코어·네트워크 기능 영역refactor동작 변경 없이 코드 구조·책임·경계를 개선하는 작업

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions