Move FakeNodeFactoriesBindings to the testutils module

The fake was declared in RootFlowNodeTest, so other tests could not use
it. Move it to the testutils module, in a new node package.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benoit Marty
2026-08-20 15:56:39 +02:00
parent e85c5041a4
commit 8e4b2145d5
2 changed files with 20 additions and 8 deletions
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2026 Element Creations 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.tests.testutils.node
import com.bumble.appyx.core.node.Node
import io.element.android.libraries.architecture.AssistedNodeFactory
import io.element.android.libraries.architecture.NodeFactoriesBindings
import kotlin.reflect.KClass
class FakeNodeFactoriesBindings(
private val nodeFactories: Map<KClass<out Node>, AssistedNodeFactory<*>>,
) : NodeFactoriesBindings {
override fun nodeFactories() = nodeFactories
}