From 9ccee886c637f7e033e9c6eba7babca08e303f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20M=C3=BCthing?= Date: Sun, 23 Aug 2020 18:01:20 +0200 Subject: [PATCH] Add tests for getTicksDelivered() --- .../omnipod/comm/message/response/StatusResponseTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponseTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponseTest.java index a931ad7b1d..6811b6d89c 100644 --- a/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponseTest.java +++ b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponseTest.java @@ -45,6 +45,7 @@ public class StatusResponseTest { assertEquals(PodProgressStatus.ABOVE_FIFTY_UNITS, statusResponse.getPodProgressStatus()); assertNull("Reservoir level should be null", statusResponse.getReservoirLevel()); assertEquals(Duration.standardMinutes(1307).getMillis(), statusResponse.getTimeActive().getMillis()); + assertEquals(1201, statusResponse.getTicksDelivered()); assertEquals(60.05, statusResponse.getInsulinDelivered(), 0.000001); assertEquals(15, statusResponse.getPodMessageCounter()); assertEquals(0, statusResponse.getInsulinNotDelivered(), 0.000001); @@ -62,6 +63,7 @@ public class StatusResponseTest { assertEquals(PodProgressStatus.FIFTY_OR_LESS_UNITS, statusResponse.getPodProgressStatus()); assertEquals(24.4, statusResponse.getReservoirLevel(), 0.000001); assertEquals(Duration.standardMinutes(4261).getMillis(), statusResponse.getTimeActive().getMillis()); + assertEquals(3134, statusResponse.getTicksDelivered()); assertEquals(156.7, statusResponse.getInsulinDelivered(), 0.000001); assertEquals(13, statusResponse.getPodMessageCounter()); assertEquals(0, statusResponse.getInsulinNotDelivered(), 0.000001); @@ -79,6 +81,7 @@ public class StatusResponseTest { assertEquals(Duration.standardMinutes(8191).getMillis(), statusResponse.getTimeActive().getMillis()); assertEquals(OmnipodConst.POD_PULSE_SIZE * 1023, statusResponse.getInsulinNotDelivered(), 0.000001); assertNull("Reservoir level should be null", statusResponse.getReservoirLevel()); + assertEquals(8191, statusResponse.getTicksDelivered()); assertEquals(OmnipodConst.POD_PULSE_SIZE * 8191, statusResponse.getInsulinDelivered(), 0.0000001); assertEquals(15, statusResponse.getPodMessageCounter()); assertEquals(8, statusResponse.getAlerts().getAlertSlots().size()); @@ -94,6 +97,7 @@ public class StatusResponseTest { assertTrue(Duration.standardMinutes(3547).isEqual(statusResponse.getTimeActive())); assertEquals(DeliveryStatus.NORMAL, statusResponse.getDeliveryStatus()); assertEquals(PodProgressStatus.FIFTY_OR_LESS_UNITS, statusResponse.getPodProgressStatus()); + assertEquals(2589, statusResponse.getTicksDelivered()); assertEquals(129.45, statusResponse.getInsulinDelivered(), 0.00001); assertEquals(46.00, statusResponse.getReservoirLevel(), 0.00001); assertEquals(2.2, statusResponse.getInsulinNotDelivered(), 0.0001);