Rewrites ResumePumpPacket with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-08 17:50:15 -07:00
parent 59d81e47de
commit 7ebe8e1698

View file

@ -1,9 +1,9 @@
package info.nightscout.pump.medtrum.comm.packets package info.nightscout.pump.medtrum.comm.packets
import com.google.common.truth.Truth.assertThat
import dagger.android.AndroidInjector import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector import dagger.android.HasAndroidInjector
import info.nightscout.pump.medtrum.MedtrumTestBase import info.nightscout.pump.medtrum.MedtrumTestBase
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
class ResumePumpPacketTest : MedtrumTestBase() { class ResumePumpPacketTest : MedtrumTestBase() {
@ -27,7 +27,6 @@ class ResumePumpPacketTest : MedtrumTestBase() {
val result = packet.getRequest() val result = packet.getRequest()
// Expected values // Expected values
Assertions.assertEquals(1, result.size) assertThat(result).asList().containsExactly(opCode.toByte())
Assertions.assertEquals(opCode.toByte(), result[0])
} }
} }