mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +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:
@@ -316,7 +316,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: .mock(settings: appSettings),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -345,7 +345,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: .mock(settings: appSettings),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -372,7 +372,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: .mock(settings: appSettings),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -411,7 +411,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: .mock(settings: appSettings),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -450,7 +450,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: .mock(settings: appSettings),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -495,7 +495,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: .mock(settings: appSettings),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -526,7 +526,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: .mock(settings: appSettings),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -598,7 +598,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: .mock(settings: appSettings),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
Reference in New Issue
Block a user