From 8a683ee5714f2e0be7c45891db0056be29c4ff44 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 17 Jan 2021 13:15:23 +0100 Subject: [PATCH] fix test --- .../nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt index 09729850e0..1b93fed0cf 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt @@ -1,5 +1,6 @@ package info.nightscout.androidaps.plugins.aps.loop +import android.app.NotificationManager import android.content.Context import dagger.Lazy import dagger.android.AndroidInjector @@ -52,7 +53,7 @@ class LoopPluginTest : TestBase() { @Mock lateinit var fabricPrivacy: FabricPrivacy @Mock lateinit var receiverStatusStore: ReceiverStatusStore @Mock lateinit var nsUpload: NSUpload - + @Mock lateinit var notificationManager: NotificationManager private lateinit var hardLimits: HardLimits lateinit var loopPlugin: LoopPlugin @@ -63,6 +64,7 @@ class LoopPluginTest : TestBase() { loopPlugin = LoopPlugin(injector, aapsLogger, rxBus, sp, Config(), constraintChecker, resourceHelper, profileFunction, context, commandQueue, activePlugin, treatmentsPlugin, virtualPumpPlugin, actionStringHandler, iobCobCalculatorPlugin, receiverStatusStore, fabricPrivacy, nsUpload, hardLimits) `when`(activePlugin.activePump).thenReturn(virtualPumpPlugin) + `when`(context.getSystemService(Context.NOTIFICATION_SERVICE)).thenReturn(notificationManager) } @Test