Create Fake classes in test modules
This commit is contained in:
parent
0303ac502a
commit
187479849d
62 changed files with 798 additions and 327 deletions
|
|
@ -7,14 +7,11 @@
|
|||
|
||||
package io.element.android.features.ftue.impl
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
|
||||
import com.bumble.appyx.core.modality.BuildContext
|
||||
import com.bumble.appyx.core.node.Node
|
||||
import com.bumble.appyx.testing.junit4.util.MainDispatcherRule
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import io.element.android.features.lockscreen.api.LockScreenEntryPoint
|
||||
import io.element.android.features.lockscreen.test.FakeLockScreenEntryPoint
|
||||
import io.element.android.tests.testutils.lambda.lambdaError
|
||||
import io.element.android.tests.testutils.node.TestParentNode
|
||||
import kotlinx.coroutines.test.runTest
|
||||
|
|
@ -37,18 +34,7 @@ class DefaultFtueEntryPointTest {
|
|||
plugins = plugins,
|
||||
analyticsEntryPoint = { _ -> lambdaError() },
|
||||
defaultFtueService = createDefaultFtueService(),
|
||||
lockScreenEntryPoint = object : LockScreenEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(
|
||||
buildContext: BuildContext,
|
||||
navTarget: LockScreenEntryPoint.Target,
|
||||
callback: LockScreenEntryPoint.Callback,
|
||||
) = lambdaError()
|
||||
|
||||
override fun pinUnlockIntent(context: Context): Intent {
|
||||
lambdaError()
|
||||
}
|
||||
},
|
||||
lockScreenEntryPoint = FakeLockScreenEntryPoint(),
|
||||
)
|
||||
}
|
||||
val result = with(parentNode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue