Create Fake classes in test modules

This commit is contained in:
Benoit Marty 2025-10-30 18:32:31 +01:00
parent 0303ac502a
commit 187479849d
62 changed files with 798 additions and 327 deletions

View file

@ -14,6 +14,8 @@ android {
}
dependencies {
implementation(libs.coroutines.core)
api(projects.features.lockscreen.api)
implementation(libs.coroutines.core)
implementation(projects.libraries.architecture)
implementation(projects.tests.testutils)
}

View file

@ -0,0 +1,26 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.features.lockscreen.test
import android.content.Context
import android.content.Intent
import com.bumble.appyx.core.modality.BuildContext
import com.bumble.appyx.core.node.Node
import io.element.android.features.lockscreen.api.LockScreenEntryPoint
import io.element.android.tests.testutils.lambda.lambdaError
class FakeLockScreenEntryPoint : LockScreenEntryPoint {
context(parentNode: Node)
override fun createNode(
buildContext: BuildContext,
navTarget: LockScreenEntryPoint.Target,
callback: LockScreenEntryPoint.Callback,
): Node = lambdaError()
override fun pinUnlockIntent(context: Context): Intent = lambdaError()
}