diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecryptTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecryptTest.kt index 7846261526..36a07eface 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecryptTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecryptTest.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecry import info.nightscout.androidaps.logging.AAPSLoggerTest import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket -import info.nightscout.androidaps.utils.extensions.toHex +import info.nightscout.androidaps.extensions.toHex import org.junit.Assert import org.junit.Test import org.spongycastle.util.encoders.Hex diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessagePacketTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessagePacketTest.kt index 21a4dc0e39..e6a25e3eb6 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessagePacketTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessagePacketTest.kt @@ -3,7 +3,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import com.google.crypto.tink.subtle.Hex import info.nightscout.androidaps.logging.AAPSLoggerTest import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id -import info.nightscout.androidaps.utils.extensions.toHex +import info.nightscout.androidaps.extensions.toHex import org.junit.Assert.assertEquals import org.junit.Test diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadJoinerTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadJoinerTest.kt index d3efcaaf29..b1a1d51519 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadJoinerTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadJoinerTest.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import com.google.crypto.tink.subtle.Hex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadJoiner -import info.nightscout.androidaps.utils.extensions.toHex +import info.nightscout.androidaps.extensions.toHex import org.junit.Assert.assertEquals import org.junit.Test diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitJoinTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitJoinTest.kt index f7edec20b4..6a12e87bd5 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitJoinTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitJoinTest.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadJoiner import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadSplitter -import info.nightscout.androidaps.utils.extensions.toHex +import info.nightscout.androidaps.extensions.toHex import org.junit.Assert.assertEquals import org.junit.Test import java.util.* diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitterTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitterTest.kt index 4ac605f1d2..bd08be97f6 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitterTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitterTest.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import com.google.crypto.tink.subtle.Hex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadSplitter -import info.nightscout.androidaps.utils.extensions.toHex +import info.nightscout.androidaps.extensions.toHex import org.junit.Assert.assertEquals import org.junit.Assert.assertTrue import org.junit.Test diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncodingTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncodingTest.kt index b34266d5be..ee1f18bad2 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncodingTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncodingTest.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import com.google.crypto.tink.subtle.Hex -import info.nightscout.androidaps.utils.extensions.toHex +import info.nightscout.androidaps.extensions.toHex import org.junit.Assert.assertEquals import org.junit.Test diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchangeTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchangeTest.kt index 50e04f6e2a..6041748403 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchangeTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchangeTest.kt @@ -3,7 +3,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair import info.nightscout.androidaps.logging.AAPSLoggerTest import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator -import info.nightscout.androidaps.utils.extensions.toHex +import info.nightscout.androidaps.extensions.toHex import org.junit.Assert.assertEquals import org.junit.Test import org.mockito.ArgumentMatchers.anyInt diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessageTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessageTest.kt index a16042ec9e..fff01c494b 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessageTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessageTest.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session import info.nightscout.androidaps.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.extensions.toHex +import info.nightscout.androidaps.extensions.toHex import org.junit.Assert import org.junit.Test import org.spongycastle.util.encoders.Hex diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/MilenageTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/MilenageTest.kt index 8317873c53..4fecfc01f9 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/MilenageTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/MilenageTest.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session import info.nightscout.androidaps.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.extensions.toHex +import info.nightscout.androidaps.extensions.toHex import org.junit.Assert import org.junit.Test import org.spongycastle.util.encoders.Hex diff --git a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/util/FunctionsTest.kt b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/util/FunctionsTest.kt index 0febb3f35a..c1d290e8fd 100644 --- a/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/util/FunctionsTest.kt +++ b/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/util/FunctionsTest.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.util -import info.nightscout.androidaps.data.Profile -import info.nightscout.androidaps.data.Profile.ProfileValue +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.Profile.ProfileValue import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BasalProgram import org.junit.Assert.assertEquals import org.junit.Rule @@ -26,7 +26,7 @@ class FunctionsTest { val value3 = Mockito.mock(ProfileValue::class.java) value3.timeAsSeconds = 50400 value3.value = 3.05 - PowerMockito.`when`(profile.basalValues).thenReturn( + PowerMockito.`when`(profile.getBasalValues()).thenReturn( arrayOf( value1, value2, @@ -50,17 +50,11 @@ class FunctionsTest { assertEquals(48.toShort(), entry3.endSlotIndex) } - @Test fun invalidProfileNullEntries() { - thrown.expect(IllegalArgumentException::class.java) - thrown.expectMessage("Basal values can not be null") - mapProfileToBasalProgram(Mockito.mock(Profile::class.java)) - } - @Test fun invalidProfileZeroEntries() { thrown.expect(IllegalArgumentException::class.java) thrown.expectMessage("Basal values should contain values") val profile = Mockito.mock(Profile::class.java) - PowerMockito.`when`(profile.basalValues).thenReturn(arrayOfNulls(0)) + PowerMockito.`when`(profile.getBasalValues()).thenReturn(emptyArray()) mapProfileToBasalProgram(profile) } @@ -71,7 +65,7 @@ class FunctionsTest { val value = Mockito.mock(ProfileValue::class.java) value.timeAsSeconds = 1800 value.value = 0.5 - PowerMockito.`when`(profile.basalValues).thenReturn( + PowerMockito.`when`(profile.getBasalValues()).thenReturn( arrayOf( value ) @@ -90,7 +84,7 @@ class FunctionsTest { val value2 = Mockito.mock(ProfileValue::class.java) value2.timeAsSeconds = 86400 value2.value = 0.5 - PowerMockito.`when`(profile.basalValues).thenReturn( + PowerMockito.`when`(profile.getBasalValues()).thenReturn( arrayOf( value1, value2 @@ -106,7 +100,7 @@ class FunctionsTest { val value = Mockito.mock(ProfileValue::class.java) value.timeAsSeconds = -1 value.value = 0.5 - PowerMockito.`when`(profile.basalValues).thenReturn( + PowerMockito.`when`(profile.getBasalValues()).thenReturn( arrayOf( value ) @@ -119,7 +113,7 @@ class FunctionsTest { val value = Mockito.mock(ProfileValue::class.java) value.timeAsSeconds = 0 value.value = 0.04 - PowerMockito.`when`(profile.basalValues).thenReturn( + PowerMockito.`when`(profile.getBasalValues()).thenReturn( arrayOf( value )