diff --git a/core/graph/src/test/java/info/nightscout/core/graph/data/InMemoryGlucoseValueDataPointTest.kt b/core/graph/src/test/java/info/nightscout/core/graph/data/InMemoryGlucoseValueDataPointTest.kt index 489876a771..d3f54d1de5 100644 --- a/core/graph/src/test/java/info/nightscout/core/graph/data/InMemoryGlucoseValueDataPointTest.kt +++ b/core/graph/src/test/java/info/nightscout/core/graph/data/InMemoryGlucoseValueDataPointTest.kt @@ -2,6 +2,7 @@ package info.nightscout.core.graph.data import android.content.Context import android.graphics.Color +import info.nightscout.database.entities.GlucoseValue import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.iob.InMemoryGlucoseValue import info.nightscout.interfaces.profile.DefaultValueHelper @@ -35,7 +36,7 @@ internal class InMemoryGlucoseValueDataPointTest { } @Test fun alphaShouldBeAddedForFilledGaps() { - val gv = InMemoryGlucoseValue(1000, 100.0) + val gv = InMemoryGlucoseValue(1000, 100.0, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN) val sut = InMemoryGlucoseValueDataPoint(gv, defaultValueHelper, profileFunction, rh) var alpha = sut.color(context).ushr(24) diff --git a/plugins/automation/src/test/java/info/nightscout/automation/triggers/TriggerBgTest.kt b/plugins/automation/src/test/java/info/nightscout/automation/triggers/TriggerBgTest.kt index d9487f616d..3946ed713f 100644 --- a/plugins/automation/src/test/java/info/nightscout/automation/triggers/TriggerBgTest.kt +++ b/plugins/automation/src/test/java/info/nightscout/automation/triggers/TriggerBgTest.kt @@ -82,7 +82,7 @@ class TriggerBgTest : TriggerTestBase() { private fun generateOneCurrentRecordBgData(): MutableList { val list: MutableList = ArrayList() - list.add(InMemoryGlucoseValue(value = 214.0, timestamp = now - 1, trendArrow = GlucoseValue.TrendArrow.FLAT)) + list.add(InMemoryGlucoseValue(value = 214.0, timestamp = now - 1, trendArrow = GlucoseValue.TrendArrow.FLAT, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) return list } } \ No newline at end of file diff --git a/plugins/automation/src/test/java/info/nightscout/automation/triggers/TriggerDeltaTest.kt b/plugins/automation/src/test/java/info/nightscout/automation/triggers/TriggerDeltaTest.kt index 1a51a05df7..13cf5b3efc 100644 --- a/plugins/automation/src/test/java/info/nightscout/automation/triggers/TriggerDeltaTest.kt +++ b/plugins/automation/src/test/java/info/nightscout/automation/triggers/TriggerDeltaTest.kt @@ -91,14 +91,14 @@ class TriggerDeltaTest : TriggerTestBase() { private fun generateValidBgData(): MutableList { val list: MutableList = ArrayList() - list.add(InMemoryGlucoseValue(value = 214.0, timestamp = 1514766900000, trendArrow = GlucoseValue.TrendArrow.FLAT)) - list.add(InMemoryGlucoseValue(value = 216.0, timestamp = 1514766600000, trendArrow = GlucoseValue.TrendArrow.FLAT)) - list.add(InMemoryGlucoseValue(value = 219.0, timestamp = 1514766300000, trendArrow = GlucoseValue.TrendArrow.FLAT)) - list.add(InMemoryGlucoseValue(value = 223.0, timestamp = 1514766000000, trendArrow = GlucoseValue.TrendArrow.FLAT)) - list.add(InMemoryGlucoseValue(value = 222.0, timestamp = 1514765700000, trendArrow = GlucoseValue.TrendArrow.FLAT)) - list.add(InMemoryGlucoseValue(value = 224.0, timestamp = 1514765400000, trendArrow = GlucoseValue.TrendArrow.FLAT)) - list.add(InMemoryGlucoseValue(value = 226.0, timestamp = 1514765100000, trendArrow = GlucoseValue.TrendArrow.FLAT)) - list.add(InMemoryGlucoseValue(value = 228.0, timestamp = 1514764800000, trendArrow = GlucoseValue.TrendArrow.FLAT)) + list.add(InMemoryGlucoseValue(value = 214.0, timestamp = 1514766900000, trendArrow = GlucoseValue.TrendArrow.FLAT, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) + list.add(InMemoryGlucoseValue(value = 216.0, timestamp = 1514766600000, trendArrow = GlucoseValue.TrendArrow.FLAT, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) + list.add(InMemoryGlucoseValue(value = 219.0, timestamp = 1514766300000, trendArrow = GlucoseValue.TrendArrow.FLAT, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) + list.add(InMemoryGlucoseValue(value = 223.0, timestamp = 1514766000000, trendArrow = GlucoseValue.TrendArrow.FLAT, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) + list.add(InMemoryGlucoseValue(value = 222.0, timestamp = 1514765700000, trendArrow = GlucoseValue.TrendArrow.FLAT, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) + list.add(InMemoryGlucoseValue(value = 224.0, timestamp = 1514765400000, trendArrow = GlucoseValue.TrendArrow.FLAT, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) + list.add(InMemoryGlucoseValue(value = 226.0, timestamp = 1514765100000, trendArrow = GlucoseValue.TrendArrow.FLAT, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) + list.add(InMemoryGlucoseValue(value = 228.0, timestamp = 1514764800000, trendArrow = GlucoseValue.TrendArrow.FLAT, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) return list } } \ No newline at end of file diff --git a/plugins/sync/src/test/java/info/nightscout/plugins/sync/dataBroadcaster/DataBroadcastPluginTest.kt b/plugins/sync/src/test/java/info/nightscout/plugins/sync/dataBroadcaster/DataBroadcastPluginTest.kt index 60490b1ed4..3ea2db45ea 100644 --- a/plugins/sync/src/test/java/info/nightscout/plugins/sync/dataBroadcaster/DataBroadcastPluginTest.kt +++ b/plugins/sync/src/test/java/info/nightscout/plugins/sync/dataBroadcaster/DataBroadcastPluginTest.kt @@ -5,6 +5,7 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.BundleMock import info.nightscout.androidaps.TestBaseWithProfile import info.nightscout.androidaps.TestPumpPlugin +import info.nightscout.database.entities.GlucoseValue import info.nightscout.database.entities.TemporaryBasal import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.aps.AutosensDataStore @@ -49,7 +50,7 @@ internal class DataBroadcastPluginTest : TestBaseWithProfile() { loop, activePlugin, receiverStatusStore, config, glucoseStatusProvider ) Mockito.`when`(iobCobCalculator.ads).thenReturn(autosensDataStore) - Mockito.`when`(autosensDataStore.lastBg()).thenReturn(InMemoryGlucoseValue(1000, 100.0)) + Mockito.`when`(autosensDataStore.lastBg()).thenReturn(InMemoryGlucoseValue(1000, 100.0, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN)) Mockito.`when`(profileFunction.getProfile()).thenReturn(validProfile) Mockito.`when`(profileFunction.getUnits()).thenReturn(GlucoseUnit.MGDL) Mockito.`when`(profileFunction.getProfileName()).thenReturn("TestProfile")