mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
Introduce lambdaError instead of using TODO, to handle error when a lambda is invoked and it should not.
This commit is contained in:
+3
-2
@@ -18,10 +18,11 @@ package io.element.android.libraries.pushstore.test.userpushstore.clientsecret
|
||||
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
import io.element.android.libraries.pushstore.api.clientsecret.PushClientSecret
|
||||
import io.element.android.tests.testutils.lambda.lambdaError
|
||||
|
||||
class FakePushClientSecret(
|
||||
private val getSecretForUserResult: (SessionId) -> String = { TODO() },
|
||||
private val getUserIdFromSecretResult: (String) -> SessionId? = { TODO() }
|
||||
private val getSecretForUserResult: (SessionId) -> String = { lambdaError() },
|
||||
private val getUserIdFromSecretResult: (String) -> SessionId? = { lambdaError() }
|
||||
) : PushClientSecret {
|
||||
override suspend fun getSecretForUser(userId: SessionId): String {
|
||||
return getSecretForUserResult(userId)
|
||||
|
||||
Reference in New Issue
Block a user