mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Create Fake classes in test modules
This commit is contained in:
@@ -14,5 +14,8 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(projects.features.location.api)
|
||||
api(projects.features.location.api)
|
||||
implementation(projects.libraries.matrix.api)
|
||||
implementation(libs.appyx.core)
|
||||
implementation(projects.tests.testutils)
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* 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.features.location.test
|
||||
|
||||
import com.bumble.appyx.core.modality.BuildContext
|
||||
import com.bumble.appyx.core.node.Node
|
||||
import io.element.android.features.location.api.SendLocationEntryPoint
|
||||
import io.element.android.libraries.matrix.api.timeline.Timeline
|
||||
import io.element.android.tests.testutils.lambda.lambdaError
|
||||
|
||||
class FakeSendLocationEntryPoint : SendLocationEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(
|
||||
buildContext: BuildContext,
|
||||
timelineMode: Timeline.Mode,
|
||||
): Node = lambdaError()
|
||||
}
|
||||
+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.features.location.test
|
||||
|
||||
import com.bumble.appyx.core.modality.BuildContext
|
||||
import com.bumble.appyx.core.node.Node
|
||||
import io.element.android.features.location.api.ShowLocationEntryPoint
|
||||
import io.element.android.tests.testutils.lambda.lambdaError
|
||||
|
||||
class FakeShowLocationEntryPoint : ShowLocationEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(
|
||||
buildContext: BuildContext,
|
||||
inputs: ShowLocationEntryPoint.Inputs,
|
||||
): Node = lambdaError()
|
||||
}
|
||||
Reference in New Issue
Block a user