parent
5a19329889
commit
369c876d49
1 changed files with 6 additions and 6 deletions
|
@ -1,9 +1,9 @@
|
||||||
package info.nightscout.pump.danars.comm
|
package info.nightscout.pump.danars.comm
|
||||||
|
|
||||||
|
import com.google.common.truth.Truth.assertThat
|
||||||
import dagger.android.AndroidInjector
|
import dagger.android.AndroidInjector
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.pump.danars.DanaRSTestBase
|
import info.nightscout.pump.danars.DanaRSTestBase
|
||||||
import org.junit.jupiter.api.Assertions
|
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
class DanaRsPacketBasalGetBasalRateTest : DanaRSTestBase() {
|
class DanaRsPacketBasalGetBasalRateTest : DanaRSTestBase() {
|
||||||
|
@ -28,9 +28,9 @@ class DanaRsPacketBasalGetBasalRateTest : DanaRSTestBase() {
|
||||||
putIntToArray(array, 0, (1.0 * 100).toInt())
|
putIntToArray(array, 0, (1.0 * 100).toInt())
|
||||||
putByteToArray(array, 2, (0.05 * 100).toInt().toByte())
|
putByteToArray(array, 2, (0.05 * 100).toInt().toByte())
|
||||||
packet.handleMessage(array)
|
packet.handleMessage(array)
|
||||||
Assertions.assertEquals(1.0, danaPump.maxBasal, 0.0)
|
assertThat(danaPump.maxBasal).isWithin(0.001).of(1.0)
|
||||||
Assertions.assertEquals(0.05, danaPump.basalStep, 0.0)
|
assertThat(danaPump.basalStep).isWithin(0.001).of(0.05)
|
||||||
Assertions.assertTrue(packet.failed)
|
assertThat(packet.failed).isTrue()
|
||||||
Assertions.assertEquals("BASAL__GET_BASAL_RATE", packet.friendlyName)
|
assertThat(packet.friendlyName).isEqualTo("BASAL__GET_BASAL_RATE")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue