add test
This commit is contained in:
parent
29da89e7d6
commit
851bb67557
1 changed files with 20 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BeepType
|
||||||
|
import org.apache.commons.codec.DecoderException
|
||||||
|
import org.apache.commons.codec.binary.Hex
|
||||||
|
import org.junit.Assert
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
|
class SuspendDeliveryCommandTest {
|
||||||
|
@Test @Throws(DecoderException::class) fun testSuspendDelivery() {
|
||||||
|
val encoded = SuspendDeliveryCommand.Builder()
|
||||||
|
.setUniqueId(37879811)
|
||||||
|
.setSequenceNumber(0.toShort())
|
||||||
|
.setNonce(1229869870)
|
||||||
|
.setBeepType(BeepType.LONG_SINGLE_BEEP)
|
||||||
|
.build()
|
||||||
|
.encoded
|
||||||
|
Assert.assertArrayEquals(Hex.decodeHex("0242000300131f05494e532e67190a494e532e680000140302811f"), encoded)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue