parent
3566c64ca8
commit
d44367a170
1 changed files with 3 additions and 4 deletions
|
@ -1,13 +1,12 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command
|
||||||
|
|
||||||
import org.apache.commons.codec.DecoderException
|
import com.google.common.truth.Truth.assertThat
|
||||||
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 DeactivateCommandTest {
|
class DeactivateCommandTest {
|
||||||
|
|
||||||
@Test @Throws(DecoderException::class) fun testEncoding() {
|
@Test fun testEncoding() {
|
||||||
val encoded = DeactivateCommand.Builder()
|
val encoded = DeactivateCommand.Builder()
|
||||||
.setUniqueId(37879809)
|
.setUniqueId(37879809)
|
||||||
.setSequenceNumber(5.toShort())
|
.setSequenceNumber(5.toShort())
|
||||||
|
@ -15,6 +14,6 @@ class DeactivateCommandTest {
|
||||||
.build()
|
.build()
|
||||||
.encoded
|
.encoded
|
||||||
|
|
||||||
Assertions.assertArrayEquals(Hex.decodeHex("0242000114061C04494E532E001C"), encoded)
|
assertThat(encoded).asList().containsExactlyElementsIn(Hex.decodeHex("0242000114061C04494E532E001C").asList()).inOrder()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue