From 8f34ca5d89a743a1c612620e5255b0ae0994bf35 Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Sun, 8 Oct 2023 18:12:06 -0700 Subject: [PATCH] Rewrites SetBolusPacketTest with matchers Issue #2745 --- .../pump/medtrum/comm/packets/SetBolusPacketTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetBolusPacketTest.kt b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetBolusPacketTest.kt index b622345911..7cca16d361 100644 --- a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetBolusPacketTest.kt +++ b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetBolusPacketTest.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 SetBolusPacketTest : MedtrumTestBase() { @@ -28,6 +28,6 @@ class SetBolusPacketTest : MedtrumTestBase() { // Expected values val expected = byteArrayOf(19, 1, 47, 0, 0) - Assertions.assertEquals(expected.contentToString(), result.contentToString()) + assertThat(result).asList().containsExactlyElementsIn(expected.toList()).inOrder() } }