mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Integrate Mokkery and Turbine into KMP testing framework (#4845)
This commit is contained in:
parent
df3a094430
commit
dcbbc0823b
159 changed files with 1860 additions and 2809 deletions
|
|
@ -33,6 +33,7 @@ plugins {
|
|||
alias(libs.plugins.kotlin.parcelize)
|
||||
alias(libs.plugins.secrets)
|
||||
alias(libs.plugins.aboutlibraries)
|
||||
id("dev.mokkery")
|
||||
}
|
||||
|
||||
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
|
|
@ -303,7 +304,6 @@ dependencies {
|
|||
testImplementation(libs.androidx.work.testing)
|
||||
testImplementation(libs.koin.test)
|
||||
testImplementation(libs.junit)
|
||||
testImplementation(libs.mockk)
|
||||
testImplementation(libs.kotlinx.coroutines.test)
|
||||
testImplementation(libs.robolectric)
|
||||
testImplementation(libs.androidx.test.core)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
package org.meshtastic.app.service
|
||||
|
||||
import android.app.Notification
|
||||
import io.mockk.mockk
|
||||
import dev.mokkery.MockMode
|
||||
import dev.mokkery.mock
|
||||
import org.meshtastic.core.model.Node
|
||||
import org.meshtastic.core.repository.MeshServiceNotifications
|
||||
import org.meshtastic.core.repository.RadioInterfaceService
|
||||
|
|
@ -25,7 +26,7 @@ import org.meshtastic.proto.ClientNotification
|
|||
import org.meshtastic.proto.Telemetry
|
||||
|
||||
class Fakes {
|
||||
val service: RadioInterfaceService = mockk(relaxed = true)
|
||||
val service: RadioInterfaceService = mock(MockMode.autofill)
|
||||
}
|
||||
|
||||
class FakeMeshServiceNotifications : MeshServiceNotifications {
|
||||
|
|
@ -34,7 +35,7 @@ class FakeMeshServiceNotifications : MeshServiceNotifications {
|
|||
override fun initChannels() {}
|
||||
|
||||
override fun updateServiceStateNotification(summaryString: String?, telemetry: Telemetry?): Notification =
|
||||
mockk(relaxed = true)
|
||||
mock(MockMode.autofill)
|
||||
|
||||
override suspend fun updateMessageNotification(
|
||||
contactKey: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue