Rewrites ProgramBeepsCommandTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-08 20:50:28 -07:00
parent f111f7f091
commit 2929fd957f

View file

@ -1,15 +1,14 @@
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.definition.BeepType
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.ProgramReminder
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 ProgramBeepsCommandTest {
@Test @Throws(DecoderException::class) fun testPlayTestBeep() {
@Test fun testPlayTestBeep() {
val encoded = ProgramBeepsCommand.Builder()
.setUniqueId(37879810)
.setSequenceNumber(11.toShort())
@ -20,6 +19,6 @@ class ProgramBeepsCommandTest {
.build()
.encoded
Assertions.assertArrayEquals(Hex.decodeHex("024200022C061E0402000000800F"), encoded)
assertThat(encoded).asList().containsExactlyElementsIn(Hex.decodeHex("024200022C061E0402000000800F").asList()).inOrder()
}
}