2 Commits

Author SHA1 Message Date
wangdl
d8125ddf34 fix: iOS compile errors - protocol mismatches + void return
- ReadingRuntimeAdapter: clearExportedEvents is void, return count separately
- ActivityViewModel: FocusItemServicing.list→listAll, add days/type? params
- ActivityViewModelTests: update mocks to match new protocol signatures

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 16:58:23 +08:00
wangdl
3a8266ece2 test: add ActivityViewModel unit tests with DI (IOS-INFO-036)
- Add 5 service protocols (ActivityServicing, FocusItemServicing,
  ReadingContinueServicing, LearningStatusServicing)
- ViewModel init supports DI with defaults to .shared
- Mock services for all 10 parallel calls in loadAll/refresh
- 20 tests: initial state, summary/focus/heatmap/streak/trends/recos,
  learningSummary/readingTrend/continueReading/recentRecords,
  errorMessage on nil summary, refresh clears error

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 13:19:07 +08:00