Skip to content

Commit

Permalink
Add Koin unit testing deps implementation
Browse files Browse the repository at this point in the history
This allows Koin to do DI during unit tests and allows us to establish
Junit rules which involve Koin
This is essential for testing some classes as the playback code, where
DI is used heavily
  • Loading branch information
DavidFair committed Dec 23, 2021
1 parent 6951a7f commit 44df17c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,6 @@ dependencies {
// Testing
testImplementation(libs.junit)
testImplementation(libs.mockito)
testImplementation(libs.koin.test)
testImplementation(libs.koin.test.junit4)
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ android-desugar = { module = "com.android.tools:desugar_jdk_libs", version.ref =
# Testing
junit = { module = "junit:junit", version.ref = "junit" }
mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }
koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin" }
koin-test-junit4 = { module = "io.insert-koin:koin-test-junit4", version.ref = "koin" }

[bundles]
acra = [
Expand Down

0 comments on commit 44df17c

Please sign in to comment.