Create Fake classes in test modules

This commit is contained in:
Benoit Marty
2025-10-30 18:32:31 +01:00
parent fd6493bf4e
commit 6298209ad9
62 changed files with 798 additions and 327 deletions
@@ -9,11 +9,9 @@ package io.element.android.features.poll.impl.history
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.poll.api.create.CreatePollEntryPoint
import io.element.android.tests.testutils.lambda.lambdaError
import io.element.android.features.poll.test.create.FakeCreatePollEntryPoint
import io.element.android.tests.testutils.node.TestParentNode
import kotlinx.coroutines.test.runTest
import org.junit.Rule
@@ -33,13 +31,7 @@ class DefaultPollHistoryEntryPointTest {
PollHistoryFlowNode(
buildContext = buildContext,
plugins = plugins,
createPollEntryPoint = object : CreatePollEntryPoint {
context(parentNode: Node)
override fun createNode(
buildContext: BuildContext,
params: CreatePollEntryPoint.Params,
) = lambdaError()
}
createPollEntryPoint = FakeCreatePollEntryPoint(),
)
}
val result = with(parentNode) {