From efcc9baa669ca96cd14a98640ea7a9160bcfd4f0 Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Sun, 8 Oct 2023 18:07:12 -0700 Subject: [PATCH] Rewrites SetBolusMotorPacketTest with matchers Issue #2745 --- .../pump/medtrum/comm/packets/SetBolusMotorPacketTest.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetBolusMotorPacketTest.kt b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetBolusMotorPacketTest.kt index e6350e383f..3a6cf8ed50 100644 --- a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetBolusMotorPacketTest.kt +++ b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetBolusMotorPacketTest.kt @@ -1,9 +1,9 @@ package info.nightscout.pump.medtrum.comm.packets +import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.pump.medtrum.MedtrumTestBase -import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test class SetBolusMotorPacketTest : MedtrumTestBase() { @@ -27,8 +27,6 @@ class SetBolusMotorPacketTest : MedtrumTestBase() { val result = packet.getRequest() // Expected values - val expectedByteArray = byteArrayOf(opCode.toByte()) + 0.toByte() - Assertions.assertEquals(2, result.size) - Assertions.assertEquals(expectedByteArray.contentToString(), result.contentToString()) + assertThat(result).asList().containsExactly(opCode.toByte(), 0.toByte()).inOrder() } }