parent
f85953694b
commit
3566c64ca8
1 changed files with 3 additions and 4 deletions
|
@ -1,14 +1,13 @@
|
||||||
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.response.ResponseType
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.ResponseType
|
||||||
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 GetStatusCommandTest {
|
class GetStatusCommandTest {
|
||||||
|
|
||||||
@Test @Throws(DecoderException::class) fun testGetDefaultStatusResponse() {
|
@Test fun testGetDefaultStatusResponse() {
|
||||||
val encoded = GetStatusCommand.Builder()
|
val encoded = GetStatusCommand.Builder()
|
||||||
.setUniqueId(37879810)
|
.setUniqueId(37879810)
|
||||||
.setSequenceNumber(15.toShort())
|
.setSequenceNumber(15.toShort())
|
||||||
|
@ -16,6 +15,6 @@ class GetStatusCommandTest {
|
||||||
.build()
|
.build()
|
||||||
.encoded
|
.encoded
|
||||||
|
|
||||||
Assertions.assertArrayEquals(Hex.decodeHex("024200023C030E0100024C"), encoded)
|
assertThat(encoded).asList().containsExactlyElementsIn(Hex.decodeHex("024200023C030E0100024C").asList()).inOrder()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue