Rewrites SetPatchPacketTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-08 18:13:21 -07:00
parent 8f34ca5d89
commit 5bfedf055c

View file

@ -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()
}
}