Fix missing dependency in tests
This commit is contained in:
parent
00e36392bd
commit
f98d310a8e
4 changed files with 7 additions and 9 deletions
|
@ -4,7 +4,7 @@ import app.aaps.core.interfaces.plugin.ActivePlugin
|
|||
import app.aaps.core.interfaces.pump.PumpSync
|
||||
import app.aaps.core.interfaces.resources.ResourceHelper
|
||||
import app.aaps.core.interfaces.sharedPreferences.SP
|
||||
import app.aaps.shared.tests.TestBase
|
||||
import app.aaps.shared.tests.TestBaseWithProfile
|
||||
import dagger.android.AndroidInjector
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
|
||||
|
@ -16,15 +16,13 @@ import info.nightscout.pump.common.sync.PumpSyncStorage
|
|||
import org.mockito.Answers
|
||||
import org.mockito.Mock
|
||||
|
||||
open class MedtronicTestBase : TestBase() {
|
||||
open class MedtronicTestBase : TestBaseWithProfile() {
|
||||
|
||||
var rileyLinkUtil = RileyLinkUtil()
|
||||
|
||||
@Mock lateinit var pumpSync: PumpSync
|
||||
@Mock lateinit var pumpSyncStorage: PumpSyncStorage
|
||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS) lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var sp: SP
|
||||
@Mock lateinit var rh: ResourceHelper
|
||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS) override lateinit var activePlugin: ActivePlugin
|
||||
|
||||
lateinit var medtronicUtil: MedtronicUtil
|
||||
lateinit var decoder: MedtronicPumpHistoryDecoder
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.mockito.Mock
|
|||
decoder = MedtronicPumpHistoryDecoder(aapsLogger, medtronicUtil)
|
||||
medtronicHistoryData = MedtronicHistoryData(
|
||||
packetInjector, aapsLogger, sp, rh, rxBus, activePlugin,
|
||||
medtronicUtil, decoder, medtronicPumpStatus, pumpSync, pumpSyncStorage, uiInteraction
|
||||
medtronicUtil, decoder, medtronicPumpStatus, pumpSync, pumpSyncStorage, uiInteraction, profileUtil
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class MedtronicHistoryDataUTest : MedtronicTestBase() {
|
|||
|
||||
val unitToTest = MedtronicHistoryData(
|
||||
packetInjector, aapsLogger, sp, rh, rxBus, activePlugin,
|
||||
medtronicUtil, decoder, medtronicPumpStatus, pumpSync, pumpSyncStorage, uiInteraction
|
||||
medtronicUtil, decoder, medtronicPumpStatus, pumpSync, pumpSyncStorage, uiInteraction, profileUtil
|
||||
)
|
||||
|
||||
val gson = Gson()
|
||||
|
@ -75,7 +75,7 @@ class MedtronicHistoryDataUTest : MedtronicTestBase() {
|
|||
medtronicUtil, decoder,
|
||||
medtronicPumpStatus,
|
||||
pumpSync,
|
||||
pumpSyncStorage, uiInteraction
|
||||
pumpSyncStorage, uiInteraction, profileUtil
|
||||
)
|
||||
|
||||
val gson = Gson()
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.mockito.invocation.InvocationOnMock
|
|||
@Suppress("SpellCheckingInspection")
|
||||
open class TestBaseWithProfile : TestBase() {
|
||||
|
||||
@Mock lateinit var activePlugin: ActivePlugin
|
||||
@Mock open lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var rh: ResourceHelper
|
||||
@Mock lateinit var iobCobCalculator: IobCobCalculator
|
||||
@Mock lateinit var fabricPrivacy: FabricPrivacy
|
||||
|
|
Loading…
Reference in a new issue