Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions feature-apkinspector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ dependencies {

implementation(libs.hilt.android)
ksp(libs.hilt.compiler)

testImplementation(libs.junit)
testImplementation(libs.turbine)
testImplementation(libs.kotlinx.coroutines.test)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.sayanthrock.rockreleasehub.feature.apkinspector

import app.cash.turbine.test
import kotlinx.coroutines.test.runTest
import org.junit.Assert.assertEquals
import org.junit.Test

class ApkViewModelTest {

@Test
fun initialStateIsIdle() = runTest {
val viewModel = ApkViewModel()

viewModel.uiState.test {
assertEquals(ApkState.Idle, awaitItem())
cancelAndIgnoreRemainingEvents()
}
}
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pagingCompose = "3.3.0-alpha05"
coil = "2.6.0"
ksp = "1.9.23-1.0.19"
coroutines = "1.8.0"
turbine = "1.1.0"

[libraries]
robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" }
Expand Down Expand Up @@ -80,6 +81,7 @@ coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coi
# Coroutines
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" }
turbine = { group = "app.cash.turbine", name = "turbine", version.ref = "turbine" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
Expand Down
Loading