Rewrites PollPatchPacketTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-08 17:26:57 -07:00
parent 8b85e00953
commit eeb3a84b9c

View file

@ -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 PollPatchPacketTest : MedtrumTestBase() {
@ -27,7 +27,6 @@ class PollPatchPacketTest : MedtrumTestBase() {
val result = packet.getRequest()
// Expected values
Assertions.assertEquals(1, result.size)
Assertions.assertEquals(opCode.toByte(), result[0])
assertThat(result).asList().containsExactly(opCode.toByte())
}
}