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