From c98ffb2df11f52e90e828e2136f91ab9e37e0790 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 17 Aug 2018 19:34:53 +0200 Subject: [PATCH] iobplugin tests --- .../IobCobCalculatorPlugin/IobCobCalculatorPluginTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/IobCobCalculatorPlugin/IobCobCalculatorPluginTest.java b/app/src/test/java/info/nightscout/androidaps/plugins/IobCobCalculatorPlugin/IobCobCalculatorPluginTest.java index 05133f544b..01e0d652ec 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/IobCobCalculatorPlugin/IobCobCalculatorPluginTest.java +++ b/app/src/test/java/info/nightscout/androidaps/plugins/IobCobCalculatorPlugin/IobCobCalculatorPluginTest.java @@ -184,6 +184,12 @@ public class IobCobCalculatorPluginTest { Assert.assertEquals(90, iobCobCalculatorPlugin.getBucketedData().get(1).value, 1); Assert.assertEquals(50, iobCobCalculatorPlugin.getBucketedData().get(5).value, 1); Assert.assertEquals(40, iobCobCalculatorPlugin.getBucketedData().get(6).value, 1); + + //bucketed data should be null if no bg data available + iobCobCalculatorPlugin.setBgReadings(null); + iobCobCalculatorPlugin.createBucketedData(); + Assert.assertEquals(null, iobCobCalculatorPlugin.getBucketedData()); + } @Test