Rewrites GetStatusCommandTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-08 20:36:46 -07:00
parent f85953694b
commit 3566c64ca8

View file

@ -1,14 +1,13 @@
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 org.apache.commons.codec.DecoderException
import org.apache.commons.codec.binary.Hex
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
class GetStatusCommandTest {
@Test @Throws(DecoderException::class) fun testGetDefaultStatusResponse() {
@Test fun testGetDefaultStatusResponse() {
val encoded = GetStatusCommand.Builder()
.setUniqueId(37879810)
.setSequenceNumber(15.toShort())
@ -16,6 +15,6 @@ class GetStatusCommandTest {
.build()
.encoded
Assertions.assertArrayEquals(Hex.decodeHex("024200023C030E0100024C"), encoded)
assertThat(encoded).asList().containsExactlyElementsIn(Hex.decodeHex("024200023C030E0100024C").asList()).inOrder()
}
}