From 77964df4aeb0097991fa4243dee4f166170c8bfd Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Sun, 8 Oct 2023 20:43:09 -0700 Subject: [PATCH] Rewrites GetVersionCommandTest with matchers Issue #2745 --- .../dash/driver/pod/command/GetVersionCommandTest.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/GetVersionCommandTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/GetVersionCommandTest.kt index d3f66e68c0..dd7ab87763 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/GetVersionCommandTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/GetVersionCommandTest.kt @@ -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() } }