Stronger lambda error (#4771)

* Make sure lambdaError() make the test fail in all circumstances.

* Fix existing errors on tests.

* Uniformize the way we are creating class under test.

* Cleanup

* Fix typo

* Fix failing test after rebase.
This commit is contained in:
Benoit Marty 2025-05-27 17:32:09 +02:00 committed by GitHub
parent 5b9da3c41b
commit 4572419ed2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 289 additions and 279 deletions

View file

@ -17,7 +17,6 @@ import io.element.android.libraries.matrix.test.encryption.FakeEncryptionService
import io.element.android.libraries.matrix.test.encryption.FakeIdentityPasswordResetHandle
import io.element.android.libraries.matrix.test.verification.FakeSessionVerificationService
import io.element.android.tests.testutils.lambda.lambdaRecorder
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.advanceUntilIdle
@ -132,11 +131,10 @@ class ResetIdentityFlowManagerTest {
private fun TestScope.createFlowManager(
encryptionService: FakeEncryptionService = FakeEncryptionService(),
client: FakeMatrixClient = FakeMatrixClient(encryptionService = encryptionService),
sessionCoroutineScope: CoroutineScope = this,
sessionVerificationService: FakeSessionVerificationService = FakeSessionVerificationService(),
) = ResetIdentityFlowManager(
matrixClient = client,
sessionCoroutineScope = sessionCoroutineScope,
sessionCoroutineScope = this,
sessionVerificationService = sessionVerificationService,
)
}