fix tests
This commit is contained in:
parent
970923df03
commit
0a011ab30d
6 changed files with 4 additions and 14 deletions
|
@ -28,10 +28,8 @@ import app.aaps.database.entities.TherapyEvent
|
||||||
import app.aaps.database.entities.embedments.InsulinConfiguration
|
import app.aaps.database.entities.embedments.InsulinConfiguration
|
||||||
import app.aaps.database.entities.embedments.InterfaceIDs
|
import app.aaps.database.entities.embedments.InterfaceIDs
|
||||||
import app.aaps.database.impl.AppRepository
|
import app.aaps.database.impl.AppRepository
|
||||||
import app.aaps.plugins.sync.nsShared.NsIncomingDataProcessor
|
|
||||||
import app.aaps.plugins.sync.nsShared.StoreDataForDbImpl
|
import app.aaps.plugins.sync.nsShared.StoreDataForDbImpl
|
||||||
import app.aaps.plugins.sync.nsclient.ReceiverDelegate
|
import app.aaps.plugins.sync.nsclient.ReceiverDelegate
|
||||||
import app.aaps.plugins.sync.nsclient.data.NSDeviceStatusHandler
|
|
||||||
import app.aaps.plugins.sync.nsclient.extensions.fromConstant
|
import app.aaps.plugins.sync.nsclient.extensions.fromConstant
|
||||||
import app.aaps.shared.tests.TestBaseWithProfile
|
import app.aaps.shared.tests.TestBaseWithProfile
|
||||||
import com.google.common.truth.Truth.assertThat
|
import com.google.common.truth.Truth.assertThat
|
||||||
|
@ -55,8 +53,6 @@ internal class NSClientV3PluginTest : TestBaseWithProfile() {
|
||||||
@Mock lateinit var nsClientSource: NSClientSource
|
@Mock lateinit var nsClientSource: NSClientSource
|
||||||
@Mock lateinit var virtualPump: VirtualPump
|
@Mock lateinit var virtualPump: VirtualPump
|
||||||
@Mock lateinit var mockedProfileFunction: ProfileFunction
|
@Mock lateinit var mockedProfileFunction: ProfileFunction
|
||||||
@Mock lateinit var nsDeviceStatusHandler: NSDeviceStatusHandler
|
|
||||||
@Mock lateinit var nsIncomingDataProcessor: NsIncomingDataProcessor
|
|
||||||
@Mock lateinit var repository: AppRepository
|
@Mock lateinit var repository: AppRepository
|
||||||
@Mock lateinit var persistenceLayer: PersistenceLayer
|
@Mock lateinit var persistenceLayer: PersistenceLayer
|
||||||
@Mock lateinit var insulin: Insulin
|
@Mock lateinit var insulin: Insulin
|
||||||
|
@ -83,8 +79,8 @@ internal class NSClientV3PluginTest : TestBaseWithProfile() {
|
||||||
sut =
|
sut =
|
||||||
NSClientV3Plugin(
|
NSClientV3Plugin(
|
||||||
injector, aapsLogger, aapsSchedulers, rxBus, rh, context, fabricPrivacy,
|
injector, aapsLogger, aapsSchedulers, rxBus, rh, context, fabricPrivacy,
|
||||||
sp, receiverDelegate, config, dateUtil, uiInteraction, dataSyncSelectorV3, persistenceLayer,
|
sp, receiverDelegate, config, dateUtil, dataSyncSelectorV3, persistenceLayer,
|
||||||
nsDeviceStatusHandler, nsClientSource, nsIncomingDataProcessor, storeDataForDb, decimalFormatter
|
nsClientSource, storeDataForDb, decimalFormatter
|
||||||
)
|
)
|
||||||
sut.nsAndroidClient = nsAndroidClient
|
sut.nsAndroidClient = nsAndroidClient
|
||||||
Mockito.`when`(mockedProfileFunction.getProfile(anyLong())).thenReturn(validProfile)
|
Mockito.`when`(mockedProfileFunction.getProfile(anyLong())).thenReturn(validProfile)
|
||||||
|
|
|
@ -13,7 +13,6 @@ import app.aaps.core.interfaces.receivers.ReceiverStatusStore
|
||||||
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.source.NSClientSource
|
import app.aaps.core.interfaces.source.NSClientSource
|
||||||
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.interfaces.utils.DecimalFormatter
|
import app.aaps.core.interfaces.utils.DecimalFormatter
|
||||||
import app.aaps.core.interfaces.utils.fabric.FabricPrivacy
|
import app.aaps.core.interfaces.utils.fabric.FabricPrivacy
|
||||||
|
@ -23,9 +22,7 @@ import app.aaps.core.utils.receivers.DataWorkerStorage
|
||||||
import app.aaps.database.entities.GlucoseValue
|
import app.aaps.database.entities.GlucoseValue
|
||||||
import app.aaps.database.entities.embedments.InterfaceIDs
|
import app.aaps.database.entities.embedments.InterfaceIDs
|
||||||
import app.aaps.implementation.utils.DecimalFormatterImpl
|
import app.aaps.implementation.utils.DecimalFormatterImpl
|
||||||
import app.aaps.plugins.sync.nsShared.NsIncomingDataProcessor
|
|
||||||
import app.aaps.plugins.sync.nsclient.ReceiverDelegate
|
import app.aaps.plugins.sync.nsclient.ReceiverDelegate
|
||||||
import app.aaps.plugins.sync.nsclient.data.NSDeviceStatusHandler
|
|
||||||
import app.aaps.plugins.sync.nsclientV3.DataSyncSelectorV3
|
import app.aaps.plugins.sync.nsclientV3.DataSyncSelectorV3
|
||||||
import app.aaps.plugins.sync.nsclientV3.NSClientV3Plugin
|
import app.aaps.plugins.sync.nsclientV3.NSClientV3Plugin
|
||||||
import app.aaps.plugins.sync.nsclientV3.extensions.toNSSvgV3
|
import app.aaps.plugins.sync.nsclientV3.extensions.toNSSvgV3
|
||||||
|
@ -54,16 +51,13 @@ internal class LoadBgWorkerTest : TestBase() {
|
||||||
@Mock lateinit var nsAndroidClient: NSAndroidClient
|
@Mock lateinit var nsAndroidClient: NSAndroidClient
|
||||||
@Mock lateinit var rh: ResourceHelper
|
@Mock lateinit var rh: ResourceHelper
|
||||||
@Mock lateinit var config: Config
|
@Mock lateinit var config: Config
|
||||||
@Mock lateinit var uiInteraction: UiInteraction
|
|
||||||
@Mock lateinit var dataSyncSelectorV3: DataSyncSelectorV3
|
@Mock lateinit var dataSyncSelectorV3: DataSyncSelectorV3
|
||||||
@Mock lateinit var persistenceLayer: PersistenceLayer
|
@Mock lateinit var persistenceLayer: PersistenceLayer
|
||||||
@Mock lateinit var receiverStatusStore: ReceiverStatusStore
|
@Mock lateinit var receiverStatusStore: ReceiverStatusStore
|
||||||
@Mock lateinit var nsClientSource: NSClientSource
|
@Mock lateinit var nsClientSource: NSClientSource
|
||||||
@Mock lateinit var workManager: WorkManager
|
@Mock lateinit var workManager: WorkManager
|
||||||
@Mock lateinit var workContinuation: WorkContinuation
|
@Mock lateinit var workContinuation: WorkContinuation
|
||||||
@Mock lateinit var nsDeviceStatusHandler: NSDeviceStatusHandler
|
|
||||||
@Mock lateinit var storeDataForDb: StoreDataForDb
|
@Mock lateinit var storeDataForDb: StoreDataForDb
|
||||||
@Mock lateinit var nsIncomingDataProcessor: NsIncomingDataProcessor
|
|
||||||
@Mock lateinit var context: ContextWithInjector
|
@Mock lateinit var context: ContextWithInjector
|
||||||
|
|
||||||
private lateinit var nsClientV3Plugin: NSClientV3Plugin
|
private lateinit var nsClientV3Plugin: NSClientV3Plugin
|
||||||
|
@ -101,8 +95,8 @@ internal class LoadBgWorkerTest : TestBase() {
|
||||||
receiverDelegate = ReceiverDelegate(rxBus, rh, sp, receiverStatusStore, aapsSchedulers, fabricPrivacy)
|
receiverDelegate = ReceiverDelegate(rxBus, rh, sp, receiverStatusStore, aapsSchedulers, fabricPrivacy)
|
||||||
nsClientV3Plugin = NSClientV3Plugin(
|
nsClientV3Plugin = NSClientV3Plugin(
|
||||||
injector, aapsLogger, aapsSchedulers, rxBus, rh, context, fabricPrivacy,
|
injector, aapsLogger, aapsSchedulers, rxBus, rh, context, fabricPrivacy,
|
||||||
sp, receiverDelegate, config, dateUtil, uiInteraction, dataSyncSelectorV3, persistenceLayer,
|
sp, receiverDelegate, config, dateUtil, dataSyncSelectorV3, persistenceLayer,
|
||||||
nsDeviceStatusHandler, nsClientSource, nsIncomingDataProcessor, storeDataForDb, decimalFormatter
|
nsClientSource, storeDataForDb, decimalFormatter
|
||||||
)
|
)
|
||||||
nsClientV3Plugin.newestDataOnServer = LastModified(LastModified.Collections())
|
nsClientV3Plugin.newestDataOnServer = LastModified(LastModified.Collections())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue