Add test on DefaultClearCacheUseCase
This commit is contained in:
parent
64433ea209
commit
4a885769be
4 changed files with 78 additions and 1 deletions
|
|
@ -19,7 +19,9 @@ package io.element.android.features.roomlist.impl.migration
|
|||
import io.element.android.features.roomlist.api.migration.MigrationScreenStore
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
|
||||
class InMemoryMigrationScreenStore : MigrationScreenStore {
|
||||
class InMemoryMigrationScreenStore(
|
||||
private val resetLambda: () -> Unit = { }
|
||||
) : MigrationScreenStore {
|
||||
private val store = mutableMapOf<SessionId, Boolean>()
|
||||
|
||||
override fun isMigrationScreenNeeded(sessionId: SessionId): Boolean {
|
||||
|
|
@ -33,5 +35,6 @@ class InMemoryMigrationScreenStore : MigrationScreenStore {
|
|||
|
||||
override fun reset() {
|
||||
store.clear()
|
||||
resetLambda()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue