mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Create Fake classes in test modules
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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.libraries.mediaviewer.test
|
||||
|
||||
import com.bumble.appyx.core.modality.BuildContext
|
||||
import com.bumble.appyx.core.node.Node
|
||||
import io.element.android.libraries.mediaviewer.api.MediaGalleryEntryPoint
|
||||
import io.element.android.tests.testutils.lambda.lambdaError
|
||||
|
||||
class FakeMediaGalleryEntryPoint : MediaGalleryEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(
|
||||
buildContext: BuildContext,
|
||||
callback: MediaGalleryEntryPoint.Callback,
|
||||
): Node = lambdaError()
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 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.libraries.mediaviewer.test
|
||||
|
||||
import com.bumble.appyx.core.modality.BuildContext
|
||||
import com.bumble.appyx.core.node.Node
|
||||
import io.element.android.libraries.mediaviewer.api.MediaViewerEntryPoint
|
||||
import io.element.android.tests.testutils.lambda.lambdaError
|
||||
|
||||
class FakeMediaViewerEntryPoint : MediaViewerEntryPoint {
|
||||
override fun createParamsForAvatar(filename: String, avatarUrl: String) = lambdaError()
|
||||
|
||||
context(parentNode: Node)
|
||||
override fun createNode(
|
||||
buildContext: BuildContext,
|
||||
params: MediaViewerEntryPoint.Params,
|
||||
callback: MediaViewerEntryPoint.Callback,
|
||||
): Node = lambdaError()
|
||||
}
|
||||
Reference in New Issue
Block a user