From 41b6765da8fb0c05dff8b339ca23b6a3d39839d9 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 18 Apr 2021 17:58:23 -0700 Subject: Fix coroutine tests --- .../kotlin/com/pitchedapps/frost/TestModules.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 app/src/androidTest/kotlin/com/pitchedapps/frost/TestModules.kt (limited to 'app/src/androidTest/kotlin/com/pitchedapps/frost/TestModules.kt') diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/TestModules.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/TestModules.kt new file mode 100644 index 00000000..3d43f1b1 --- /dev/null +++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/TestModules.kt @@ -0,0 +1,19 @@ +package com.pitchedapps.frost + +import ca.allanwang.kau.kpref.KPrefFactory +import ca.allanwang.kau.kpref.KPrefFactoryInMemory +import com.pitchedapps.frost.prefs.PrefFactoryModule +import dagger.Module +import dagger.Provides +import dagger.hilt.components.SingletonComponent +import dagger.hilt.testing.TestInstallIn + +@Module +@TestInstallIn( + components = [SingletonComponent::class], + replaces = [PrefFactoryModule::class] +) +object PrefFactoryTestModule { + @Provides + fun factory(): KPrefFactory = KPrefFactoryInMemory +} -- cgit v1.2.3