aboutsummaryrefslogtreecommitdiff
path: root/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-04-17 14:48:01 -0700
committerAllan Wang <me@allanwang.ca>2021-04-17 14:48:01 -0700
commit6c4d3c203ab87d4d4cc3b86bf4e55c40b18cff96 (patch)
treec971b19d1a644838fed8800434bf2948e5b8f86e /sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
parentdab71ba1f0633ae12d02be6a7bb2c86548b1a590 (diff)
downloadkau-6c4d3c203ab87d4d4cc3b86bf4e55c40b18cff96.tar.gz
kau-6c4d3c203ab87d4d4cc3b86bf4e55c40b18cff96.tar.bz2
kau-6c4d3c203ab87d4d4cc3b86bf4e55c40b18cff96.zip
Update versions and fix hilt
Diffstat (limited to 'sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt')
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
index 74da014..1615d2f 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
@@ -17,13 +17,16 @@ package ca.allanwang.kau.sample.test
import ca.allanwang.kau.kpref.KPrefFactory
import ca.allanwang.kau.kpref.KPrefFactoryInMemory
+import ca.allanwang.kau.sample.PrefFactoryModule
import dagger.Module
import dagger.Provides
-import dagger.hilt.InstallIn
-import dagger.hilt.android.components.ApplicationComponent
+import dagger.hilt.components.SingletonComponent
+import dagger.hilt.testing.TestInstallIn
@Module
-@InstallIn(ApplicationComponent::class)
+@TestInstallIn(
+ components = [SingletonComponent::class],
+ replaces = [PrefFactoryModule::class])
object PrefFactoryTestModule {
@Provides
fun factory(): KPrefFactory = KPrefFactoryInMemory