From 5bfedf055c35959de660aa364d284edcab338e49 Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Sun, 8 Oct 2023 18:13:21 -0700 Subject: [PATCH] Rewrites SetPatchPacketTest with matchers Issue #2745 --- .../pump/medtrum/comm/packets/SetPatchPacketTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetPatchPacketTest.kt b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetPatchPacketTest.kt index 924f3f129d..cc2daf2b48 100644 --- a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetPatchPacketTest.kt +++ b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SetPatchPacketTest.kt @@ -1,10 +1,10 @@ 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 info.nightscout.pump.medtrum.comm.enums.AlarmSetting -import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test class SetPatchPacketTest : MedtrumTestBase() { @@ -33,6 +33,6 @@ class SetPatchPacketTest : MedtrumTestBase() { // Expected values val expected = byteArrayOf(35, 1, 32, 3, 16, 14, 0, 0, 12, 0, 0, 30) - Assertions.assertEquals(expected.contentToString(), result.contentToString()) + assertThat(result).asList().containsExactlyElementsIn(expected.toList()).inOrder() } }