diff --git a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java index 68e4f82eee..6259a7e17c 100644 --- a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java +++ b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java @@ -1,26 +1,26 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo; -import org.joda.time.DateTime; -import org.joda.time.Duration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; +import static com.google.common.truth.Truth.assertThat; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode; import info.nightscout.pump.core.utils.ByteUtil; +import org.joda.time.DateTime; +import org.joda.time.Duration; +import org.junit.jupiter.api.Test; class PodInfoFaultAndInitializationTimeTest { @Test void testDecoding() { PodInfoFaultAndInitializationTime podInfoFaultAndInitializationTime = new PodInfoFaultAndInitializationTime(ByteUtil.fromHexString("059200010000000000000000091912170e")); // From https://github.com/ps2/rileylink_ios/blob/omnipod-testing/OmniKitTests/PodInfoTests.swift - Assertions.assertEquals(FaultEventCode.BAD_PUMP_REQ_2_STATE, podInfoFaultAndInitializationTime.getFaultEventCode()); - Assertions.assertTrue(Duration.standardMinutes(1).isEqual(podInfoFaultAndInitializationTime.getTimeFaultEvent())); + assertThat(podInfoFaultAndInitializationTime.getFaultEventCode()).isEqualTo(FaultEventCode.BAD_PUMP_REQ_2_STATE); + assertThat(podInfoFaultAndInitializationTime.getTimeFaultEvent()).isEqualTo(Duration.standardMinutes(1)); DateTime dateTime = podInfoFaultAndInitializationTime.getInitializationTime(); - Assertions.assertEquals(2018, dateTime.getYear()); - Assertions.assertEquals(9, dateTime.getMonthOfYear()); - Assertions.assertEquals(25, dateTime.getDayOfMonth()); - Assertions.assertEquals(23, dateTime.getHourOfDay()); - Assertions.assertEquals(14, dateTime.getMinuteOfHour()); + assertThat(dateTime.getYear()).isEqualTo(2018); + assertThat(dateTime.getMonthOfYear()).isEqualTo(9); + assertThat(dateTime.getDayOfMonth()).isEqualTo(25); + assertThat(dateTime.getHourOfDay()).isEqualTo(23); + assertThat(dateTime.getMinuteOfHour()).isEqualTo(14); } }