parent
f111f7f091
commit
2929fd957f
1 changed files with 3 additions and 4 deletions
|
@ -1,15 +1,14 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command
|
||||||
|
|
||||||
|
import com.google.common.truth.Truth.assertThat
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BeepType
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BeepType
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.ProgramReminder
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.ProgramReminder
|
||||||
import org.apache.commons.codec.DecoderException
|
|
||||||
import org.apache.commons.codec.binary.Hex
|
import org.apache.commons.codec.binary.Hex
|
||||||
import org.junit.jupiter.api.Assertions
|
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
class ProgramBeepsCommandTest {
|
class ProgramBeepsCommandTest {
|
||||||
|
|
||||||
@Test @Throws(DecoderException::class) fun testPlayTestBeep() {
|
@Test fun testPlayTestBeep() {
|
||||||
val encoded = ProgramBeepsCommand.Builder()
|
val encoded = ProgramBeepsCommand.Builder()
|
||||||
.setUniqueId(37879810)
|
.setUniqueId(37879810)
|
||||||
.setSequenceNumber(11.toShort())
|
.setSequenceNumber(11.toShort())
|
||||||
|
@ -20,6 +19,6 @@ class ProgramBeepsCommandTest {
|
||||||
.build()
|
.build()
|
||||||
.encoded
|
.encoded
|
||||||
|
|
||||||
Assertions.assertArrayEquals(Hex.decodeHex("024200022C061E0402000000800F"), encoded)
|
assertThat(encoded).asList().containsExactlyElementsIn(Hex.decodeHex("024200022C061E0402000000800F").asList()).inOrder()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue