mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +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:
@@ -23,7 +23,7 @@ class AuthenticationFlowCoordinator: FlowCoordinatorProtocol {
|
||||
private let appMediator: AppMediatorProtocol
|
||||
private let appSettings: AppSettings
|
||||
private let appHooks: AppHooks
|
||||
private let analytics: AnalyticsService
|
||||
private let analytics: AnalyticsServiceProtocol
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
|
||||
enum State: StateType {
|
||||
@@ -109,7 +109,7 @@ class AuthenticationFlowCoordinator: FlowCoordinatorProtocol {
|
||||
appMediator: AppMediatorProtocol,
|
||||
appSettings: AppSettings,
|
||||
appHooks: AppHooks,
|
||||
analytics: AnalyticsService,
|
||||
analytics: AnalyticsServiceProtocol,
|
||||
userIndicatorController: UserIndicatorControllerProtocol) {
|
||||
self.authenticationService = authenticationService
|
||||
self.bugReportService = bugReportService
|
||||
|
||||
@@ -19,7 +19,7 @@ enum OnboardingFlowCoordinatorAction {
|
||||
class OnboardingFlowCoordinator: FlowCoordinatorProtocol {
|
||||
private let userSession: UserSessionProtocol
|
||||
private let appLockService: AppLockServiceProtocol
|
||||
private let analyticsService: AnalyticsService
|
||||
private let analyticsService: AnalyticsServiceProtocol
|
||||
private let appMediator: AppMediatorProtocol
|
||||
private let appSettings: AppSettings
|
||||
private let appHooks: AppHooks
|
||||
|
||||
@@ -20,7 +20,7 @@ struct RoomRolesAndPermissionsFlowCoordinatorParameters {
|
||||
let mediaProvider: MediaProviderProtocol
|
||||
let navigationStackCoordinator: NavigationStackCoordinator
|
||||
let userIndicatorController: UserIndicatorControllerProtocol
|
||||
let analytics: AnalyticsService
|
||||
let analytics: AnalyticsServiceProtocol
|
||||
}
|
||||
|
||||
class RoomRolesAndPermissionsFlowCoordinator: FlowCoordinatorProtocol {
|
||||
@@ -28,7 +28,7 @@ class RoomRolesAndPermissionsFlowCoordinator: FlowCoordinatorProtocol {
|
||||
private let navigationStackCoordinator: NavigationStackCoordinator
|
||||
private let mediaProvider: MediaProviderProtocol
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
private let analytics: AnalyticsService
|
||||
private let analytics: AnalyticsServiceProtocol
|
||||
|
||||
enum State: StateType {
|
||||
/// The state machine hasn't started.
|
||||
|
||||
Reference in New Issue
Block a user