fix tests

This commit is contained in:
Milos Kozak 2023-08-10 16:24:18 +02:00
parent 08447da956
commit 8bb95cbc6b

View file

@ -1,6 +1,7 @@
package info.nightscout.implementation.pump package info.nightscout.implementation.pump
import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.TestBase
import info.nightscout.implementation.R
import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.pump.DetailedBolusInfo
import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.sharedPreferences.SP
@ -9,6 +10,7 @@ import org.junit.Assert.assertNull
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
class DetailedBolusInfoStorageTest : TestBase() { class DetailedBolusInfoStorageTest : TestBase() {
@ -32,6 +34,7 @@ class DetailedBolusInfoStorageTest : TestBase() {
@BeforeEach @BeforeEach
fun prepare() { fun prepare() {
Mockito.`when`(sp.getString(rh.gs(R.string.key_bolus_storage), "")).thenReturn("")
detailedBolusInfoStorage = DetailedBolusInfoStorageImpl(aapsLogger, sp, rh) detailedBolusInfoStorage = DetailedBolusInfoStorageImpl(aapsLogger, sp, rh)
} }