Move NotUsedPresenter to the testutils module

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

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benoit Marty
2026-08-20 15:51:30 +02:00
parent d71f691d75
commit e85c5041a4
3 changed files with 21 additions and 10 deletions
@@ -6,7 +6,7 @@
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.tests.testutils
package io.element.android.tests.testutils.presenter
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
@@ -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.presenter
import androidx.compose.runtime.Composable
import io.element.android.libraries.architecture.Presenter
/**
* A presenter that cannot be used, util for testing Nodes.
*/
class NotUsedPresenter<T> : Presenter<T> {
@Composable
override fun present(): T = error("Not used")
}