From 0a011ab30d2a8123327d42ac294c6abe5851a4e7 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 15 Oct 2023 20:10:53 +0200 Subject: [PATCH] fix tests --- .../src/main/res/drawable/export_custom.xml | 0 .../src/main/res/drawable/ic_cwf_infos.xml | 0 .../src/main/res/drawable/load_custom.xml | 0 .../src/main/res/drawable/set_default.xml | 0 .../plugins/sync/nsclientV3/NSClientV3PluginTest.kt | 8 ++------ .../sync/nsclientV3/workers/LoadBgWorkerTest.kt | 10 ++-------- 6 files changed, 4 insertions(+), 14 deletions(-) rename plugins/{main => sync}/src/main/res/drawable/export_custom.xml (100%) rename plugins/{main => sync}/src/main/res/drawable/ic_cwf_infos.xml (100%) rename plugins/{main => sync}/src/main/res/drawable/load_custom.xml (100%) rename plugins/{main => sync}/src/main/res/drawable/set_default.xml (100%) diff --git a/plugins/main/src/main/res/drawable/export_custom.xml b/plugins/sync/src/main/res/drawable/export_custom.xml similarity index 100% rename from plugins/main/src/main/res/drawable/export_custom.xml rename to plugins/sync/src/main/res/drawable/export_custom.xml diff --git a/plugins/main/src/main/res/drawable/ic_cwf_infos.xml b/plugins/sync/src/main/res/drawable/ic_cwf_infos.xml similarity index 100% rename from plugins/main/src/main/res/drawable/ic_cwf_infos.xml rename to plugins/sync/src/main/res/drawable/ic_cwf_infos.xml diff --git a/plugins/main/src/main/res/drawable/load_custom.xml b/plugins/sync/src/main/res/drawable/load_custom.xml similarity index 100% rename from plugins/main/src/main/res/drawable/load_custom.xml rename to plugins/sync/src/main/res/drawable/load_custom.xml diff --git a/plugins/main/src/main/res/drawable/set_default.xml b/plugins/sync/src/main/res/drawable/set_default.xml similarity index 100% rename from plugins/main/src/main/res/drawable/set_default.xml rename to plugins/sync/src/main/res/drawable/set_default.xml diff --git a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3PluginTest.kt b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3PluginTest.kt index af8d1f2fc8..75fba02329 100644 --- a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3PluginTest.kt +++ b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3PluginTest.kt @@ -28,10 +28,8 @@ import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.embedments.InsulinConfiguration import app.aaps.database.entities.embedments.InterfaceIDs 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.nsclient.ReceiverDelegate -import app.aaps.plugins.sync.nsclient.data.NSDeviceStatusHandler import app.aaps.plugins.sync.nsclient.extensions.fromConstant import app.aaps.shared.tests.TestBaseWithProfile import com.google.common.truth.Truth.assertThat @@ -55,8 +53,6 @@ internal class NSClientV3PluginTest : TestBaseWithProfile() { @Mock lateinit var nsClientSource: NSClientSource @Mock lateinit var virtualPump: VirtualPump @Mock lateinit var mockedProfileFunction: ProfileFunction - @Mock lateinit var nsDeviceStatusHandler: NSDeviceStatusHandler - @Mock lateinit var nsIncomingDataProcessor: NsIncomingDataProcessor @Mock lateinit var repository: AppRepository @Mock lateinit var persistenceLayer: PersistenceLayer @Mock lateinit var insulin: Insulin @@ -83,8 +79,8 @@ internal class NSClientV3PluginTest : TestBaseWithProfile() { sut = NSClientV3Plugin( injector, aapsLogger, aapsSchedulers, rxBus, rh, context, fabricPrivacy, - sp, receiverDelegate, config, dateUtil, uiInteraction, dataSyncSelectorV3, persistenceLayer, - nsDeviceStatusHandler, nsClientSource, nsIncomingDataProcessor, storeDataForDb, decimalFormatter + sp, receiverDelegate, config, dateUtil, dataSyncSelectorV3, persistenceLayer, + nsClientSource, storeDataForDb, decimalFormatter ) sut.nsAndroidClient = nsAndroidClient Mockito.`when`(mockedProfileFunction.getProfile(anyLong())).thenReturn(validProfile) diff --git a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorkerTest.kt b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorkerTest.kt index 0517d119bc..b1c0a551a6 100644 --- a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorkerTest.kt +++ b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorkerTest.kt @@ -13,7 +13,6 @@ import app.aaps.core.interfaces.receivers.ReceiverStatusStore import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.sharedPreferences.SP 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.DecimalFormatter 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.embedments.InterfaceIDs 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.data.NSDeviceStatusHandler import app.aaps.plugins.sync.nsclientV3.DataSyncSelectorV3 import app.aaps.plugins.sync.nsclientV3.NSClientV3Plugin import app.aaps.plugins.sync.nsclientV3.extensions.toNSSvgV3 @@ -54,16 +51,13 @@ internal class LoadBgWorkerTest : TestBase() { @Mock lateinit var nsAndroidClient: NSAndroidClient @Mock lateinit var rh: ResourceHelper @Mock lateinit var config: Config - @Mock lateinit var uiInteraction: UiInteraction @Mock lateinit var dataSyncSelectorV3: DataSyncSelectorV3 @Mock lateinit var persistenceLayer: PersistenceLayer @Mock lateinit var receiverStatusStore: ReceiverStatusStore @Mock lateinit var nsClientSource: NSClientSource @Mock lateinit var workManager: WorkManager @Mock lateinit var workContinuation: WorkContinuation - @Mock lateinit var nsDeviceStatusHandler: NSDeviceStatusHandler @Mock lateinit var storeDataForDb: StoreDataForDb - @Mock lateinit var nsIncomingDataProcessor: NsIncomingDataProcessor @Mock lateinit var context: ContextWithInjector private lateinit var nsClientV3Plugin: NSClientV3Plugin @@ -101,8 +95,8 @@ internal class LoadBgWorkerTest : TestBase() { receiverDelegate = ReceiverDelegate(rxBus, rh, sp, receiverStatusStore, aapsSchedulers, fabricPrivacy) nsClientV3Plugin = NSClientV3Plugin( injector, aapsLogger, aapsSchedulers, rxBus, rh, context, fabricPrivacy, - sp, receiverDelegate, config, dateUtil, uiInteraction, dataSyncSelectorV3, persistenceLayer, - nsDeviceStatusHandler, nsClientSource, nsIncomingDataProcessor, storeDataForDb, decimalFormatter + sp, receiverDelegate, config, dateUtil, dataSyncSelectorV3, persistenceLayer, + nsClientSource, storeDataForDb, decimalFormatter ) nsClientV3Plugin.newestDataOnServer = LastModified(LastModified.Collections()) }