Rewrites PumpHistoryEntryUTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-05 22:25:05 -07:00
parent 94a72c1cd0
commit 81514c984b

View file

@ -1,7 +1,7 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicTestBase import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicTestBase
import org.junit.jupiter.api.Assertions import com.google.common.truth.Truth.assertThat
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
/** /**
@ -10,12 +10,12 @@ import org.junit.jupiter.api.Test
*/ */
class PumpHistoryEntryUTest : MedtronicTestBase() { class PumpHistoryEntryUTest : MedtronicTestBase() {
@Test @Test
fun checkIsAfter() { fun checkIsAfter() {
val dateObject = 20191010000000L val dateObject = 20191010000000L
val queryObject = 20191009000000L val queryObject = 20191009000000L
val phe = PumpHistoryEntry() val phe = PumpHistoryEntry()
phe.atechDateTime = dateObject phe.atechDateTime = dateObject
Assertions.assertTrue(phe.isAfter(queryObject)) assertThat(phe.isAfter(queryObject)).isTrue()
} }
} }