diff --git a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/extensions/DeviceStatusExtensionKtTest.kt b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/extensions/DeviceStatusExtensionKtTest.kt index f1cdf04ba3..1213d40efc 100644 --- a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/extensions/DeviceStatusExtensionKtTest.kt +++ b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/extensions/DeviceStatusExtensionKtTest.kt @@ -5,6 +5,7 @@ import app.aaps.core.interfaces.nsclient.ProcessedDeviceStatusData import app.aaps.core.interfaces.objects.Instantiator import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.sharedPreferences.SP +import app.aaps.core.interfaces.ui.UiInteraction import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.nssdk.interfaces.RunningConfiguration import app.aaps.core.nssdk.mapper.convertToRemoteAndBack @@ -16,6 +17,7 @@ import com.google.common.truth.Truth.assertThat import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.mockito.Mock +import org.mockito.Mockito @Suppress("SpellCheckingInspection") internal class DeviceStatusExtensionKtTest : TestBase() { @@ -26,6 +28,7 @@ internal class DeviceStatusExtensionKtTest : TestBase() { @Mock lateinit var config: Config @Mock lateinit var runningConfiguration: RunningConfiguration @Mock lateinit var instantiator: Instantiator + @Mock lateinit var uiInteraction: UiInteraction private lateinit var processedDeviceStatusData: ProcessedDeviceStatusData private lateinit var nsDeviceStatusHandler: NSDeviceStatusHandler @@ -33,7 +36,8 @@ internal class DeviceStatusExtensionKtTest : TestBase() { @BeforeEach fun setup() { processedDeviceStatusData = ProcessedDeviceStatusDataImpl(rh, dateUtil, sp, instantiator) - nsDeviceStatusHandler = NSDeviceStatusHandler(sp, config, dateUtil, runningConfiguration, processedDeviceStatusData) + nsDeviceStatusHandler = NSDeviceStatusHandler(sp, config, dateUtil, runningConfiguration, processedDeviceStatusData, uiInteraction, rh) + Mockito.`when`(config.NSCLIENT).thenReturn(true) } @Test