fix tests

This commit is contained in:
Milos Kozak 2023-10-14 20:10:46 +02:00
parent 11afde0043
commit b3081773a7

View file

@ -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