From eeb3a84b9cdd396ceeebc710340efa5547aed06b Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Sun, 8 Oct 2023 17:26:57 -0700 Subject: [PATCH] Rewrites PollPatchPacketTest with matchers Issue #2745 --- .../pump/medtrum/comm/packets/PollPatchPacketTest.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/PollPatchPacketTest.kt b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/PollPatchPacketTest.kt index 0a7377989b..d5009d532b 100644 --- a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/PollPatchPacketTest.kt +++ b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/PollPatchPacketTest.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 PollPatchPacketTest : MedtrumTestBase() { @@ -27,7 +27,6 @@ class PollPatchPacketTest : MedtrumTestBase() { val result = packet.getRequest() // Expected values - Assertions.assertEquals(1, result.size) - Assertions.assertEquals(opCode.toByte(), result[0]) + assertThat(result).asList().containsExactly(opCode.toByte()) } }