mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Make AnalyticsService mockable via `AnalyticsServiceProtocol (#5599)
* Create AnalyticsServiceProtocol and conform AnalyticsService * Replace AnalyticsService properties and arguments with AnalyticsServiceProtocol * Inline AnalyticsServiceMock replacing old mock * handle more complex AnalyticsServiceMock callsites * move documentation from AnalyticsService to AnalyticsServiceProtocol
This commit is contained in:
@@ -32,8 +32,6 @@ struct ChatsTabFlowCoordinatorTests {
|
||||
|
||||
init() async throws {
|
||||
let appSettings = AppSettings()
|
||||
let analytics: AnalyticsService = .mock(settings: appSettings)
|
||||
|
||||
clientProxy = ClientProxyMock(.init(userID: "hi@bob", roomSummaryProvider: RoomSummaryProviderMock(.init(state: .loaded(.mockRooms)))))
|
||||
timelineControllerFactory = TimelineControllerFactoryMock(.init())
|
||||
|
||||
@@ -50,7 +48,7 @@ struct ChatsTabFlowCoordinatorTests {
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analytics: analytics,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
notificationManager: notificationManager,
|
||||
stateMachineFactory: stateMachineFactory)
|
||||
|
||||
Reference in New Issue
Block a user