Fix tests loophubtest.kt
This commit is contained in:
parent
3fcdad5275
commit
3f59d4eb66
|
@ -10,9 +10,11 @@ import app.aaps.core.interfaces.iob.IobTotal
|
||||||
import app.aaps.core.interfaces.logging.UserEntryLogger
|
import app.aaps.core.interfaces.logging.UserEntryLogger
|
||||||
import app.aaps.core.interfaces.profile.Profile
|
import app.aaps.core.interfaces.profile.Profile
|
||||||
import app.aaps.core.interfaces.profile.ProfileFunction
|
import app.aaps.core.interfaces.profile.ProfileFunction
|
||||||
|
import app.aaps.core.interfaces.profile.ProfileUtil
|
||||||
import app.aaps.core.interfaces.pump.DetailedBolusInfo
|
import app.aaps.core.interfaces.pump.DetailedBolusInfo
|
||||||
import app.aaps.core.interfaces.queue.CommandQueue
|
import app.aaps.core.interfaces.queue.CommandQueue
|
||||||
import app.aaps.core.interfaces.sharedPreferences.SP
|
import app.aaps.core.interfaces.sharedPreferences.SP
|
||||||
|
import app.aaps.core.main.graph.OverviewData
|
||||||
import app.aaps.database.ValueWrapper
|
import app.aaps.database.ValueWrapper
|
||||||
import app.aaps.database.entities.EffectiveProfileSwitch
|
import app.aaps.database.entities.EffectiveProfileSwitch
|
||||||
import app.aaps.database.entities.GlucoseValue
|
import app.aaps.database.entities.GlucoseValue
|
||||||
|
@ -54,6 +56,8 @@ class LoopHubTest: TestBase() {
|
||||||
@Mock lateinit var repo: AppRepository
|
@Mock lateinit var repo: AppRepository
|
||||||
@Mock lateinit var userEntryLogger: UserEntryLogger
|
@Mock lateinit var userEntryLogger: UserEntryLogger
|
||||||
@Mock lateinit var sp: SP
|
@Mock lateinit var sp: SP
|
||||||
|
@Mock lateinit var overviewData: OverviewData
|
||||||
|
@Mock lateinit var profileUtil: ProfileUtil
|
||||||
|
|
||||||
private lateinit var loopHub: LoopHubImpl
|
private lateinit var loopHub: LoopHubImpl
|
||||||
private val clock = Clock.fixed(Instant.ofEpochMilli(10_000), ZoneId.of("UTC"))
|
private val clock = Clock.fixed(Instant.ofEpochMilli(10_000), ZoneId.of("UTC"))
|
||||||
|
@ -62,7 +66,7 @@ class LoopHubTest: TestBase() {
|
||||||
fun setup() {
|
fun setup() {
|
||||||
loopHub = LoopHubImpl(
|
loopHub = LoopHubImpl(
|
||||||
aapsLogger, commandQueue, constraints, iobCobCalculator, loop,
|
aapsLogger, commandQueue, constraints, iobCobCalculator, loop,
|
||||||
profileFunction, repo, userEntryLogger, sp
|
profileFunction, repo, userEntryLogger, sp, overviewData, profileUtil
|
||||||
)
|
)
|
||||||
loopHub.clock = clock
|
loopHub.clock = clock
|
||||||
}
|
}
|
||||||
|
@ -76,6 +80,8 @@ class LoopHubTest: TestBase() {
|
||||||
verifyNoMoreInteractions(profileFunction)
|
verifyNoMoreInteractions(profileFunction)
|
||||||
verifyNoMoreInteractions(repo)
|
verifyNoMoreInteractions(repo)
|
||||||
verifyNoMoreInteractions(userEntryLogger)
|
verifyNoMoreInteractions(userEntryLogger)
|
||||||
|
verifyNoMoreInteractions(overviewData)
|
||||||
|
verifyNoMoreInteractions(profileUtil)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue