parent
d44367a170
commit
77964df4ae
1 changed files with 3 additions and 4 deletions
|
@ -1,19 +1,18 @@
|
|||
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.junit.jupiter.api.Assertions
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class GetVersionCommandTest {
|
||||
|
||||
@Test @Throws(DecoderException::class) fun testEncoding() {
|
||||
@Test fun testEncoding() {
|
||||
val encoded = GetVersionCommand.Builder()
|
||||
.setSequenceNumber(0.toShort())
|
||||
.setUniqueId(GetVersionCommand.DEFAULT_UNIQUE_ID)
|
||||
.build()
|
||||
.encoded
|
||||
|
||||
Assertions.assertArrayEquals(Hex.decodeHex("FFFFFFFF00060704FFFFFFFF82B2"), encoded)
|
||||
assertThat(encoded).asList().containsExactlyElementsIn(Hex.decodeHex("FFFFFFFF00060704FFFFFFFF82B2").asList()).inOrder()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue