fix tests
This commit is contained in:
parent
11afde0043
commit
b3081773a7
|
@ -5,6 +5,7 @@ import app.aaps.core.interfaces.nsclient.ProcessedDeviceStatusData
|
||||||
import app.aaps.core.interfaces.objects.Instantiator
|
import app.aaps.core.interfaces.objects.Instantiator
|
||||||
import app.aaps.core.interfaces.resources.ResourceHelper
|
import app.aaps.core.interfaces.resources.ResourceHelper
|
||||||
import app.aaps.core.interfaces.sharedPreferences.SP
|
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.interfaces.utils.DateUtil
|
||||||
import app.aaps.core.nssdk.interfaces.RunningConfiguration
|
import app.aaps.core.nssdk.interfaces.RunningConfiguration
|
||||||
import app.aaps.core.nssdk.mapper.convertToRemoteAndBack
|
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.BeforeEach
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import org.mockito.Mock
|
import org.mockito.Mock
|
||||||
|
import org.mockito.Mockito
|
||||||
|
|
||||||
@Suppress("SpellCheckingInspection")
|
@Suppress("SpellCheckingInspection")
|
||||||
internal class DeviceStatusExtensionKtTest : TestBase() {
|
internal class DeviceStatusExtensionKtTest : TestBase() {
|
||||||
|
@ -26,6 +28,7 @@ internal class DeviceStatusExtensionKtTest : TestBase() {
|
||||||
@Mock lateinit var config: Config
|
@Mock lateinit var config: Config
|
||||||
@Mock lateinit var runningConfiguration: RunningConfiguration
|
@Mock lateinit var runningConfiguration: RunningConfiguration
|
||||||
@Mock lateinit var instantiator: Instantiator
|
@Mock lateinit var instantiator: Instantiator
|
||||||
|
@Mock lateinit var uiInteraction: UiInteraction
|
||||||
|
|
||||||
private lateinit var processedDeviceStatusData: ProcessedDeviceStatusData
|
private lateinit var processedDeviceStatusData: ProcessedDeviceStatusData
|
||||||
private lateinit var nsDeviceStatusHandler: NSDeviceStatusHandler
|
private lateinit var nsDeviceStatusHandler: NSDeviceStatusHandler
|
||||||
|
@ -33,7 +36,8 @@ internal class DeviceStatusExtensionKtTest : TestBase() {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
fun setup() {
|
fun setup() {
|
||||||
processedDeviceStatusData = ProcessedDeviceStatusDataImpl(rh, dateUtil, sp, instantiator)
|
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
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue