Improve UtdTracker test.
This commit is contained in:
@@ -39,6 +39,8 @@ class UtdTrackerTest {
|
||||
name = Error.Name.OlmKeysNotSentError
|
||||
)
|
||||
)
|
||||
assertThat(fakeAnalyticsService.screenEvents).isEmpty()
|
||||
assertThat(fakeAnalyticsService.trackedErrors).isEmpty()
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -56,5 +58,7 @@ class UtdTrackerTest {
|
||||
name = Error.Name.OlmKeysNotSentError
|
||||
)
|
||||
)
|
||||
assertThat(fakeAnalyticsService.screenEvents).isEmpty()
|
||||
assertThat(fakeAnalyticsService.trackedErrors).isEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ class FakeAnalyticsService(
|
||||
private val isEnabledFlow = MutableStateFlow(isEnabled)
|
||||
private val didAskUserConsentFlow = MutableStateFlow(didAskUserConsent)
|
||||
val capturedEvents = mutableListOf<VectorAnalyticsEvent>()
|
||||
val screenEvents = mutableListOf<VectorAnalyticsScreen>()
|
||||
val trackedErrors = mutableListOf<Throwable>()
|
||||
|
||||
override fun getAvailableAnalyticsProviders(): Set<AnalyticsProvider> = emptySet()
|
||||
@@ -60,6 +61,7 @@ class FakeAnalyticsService(
|
||||
}
|
||||
|
||||
override fun screen(screen: VectorAnalyticsScreen) {
|
||||
screenEvents += screen
|
||||
}
|
||||
|
||||
override fun updateUserProperties(userProperties: UserProperties) {
|
||||
|
||||
Reference in New Issue
Block a user