From 1015158e8b9dfb724627f3879821b22354a1dfe9 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 15 Jul 2020 23:31:32 +0200 Subject: [PATCH] fix test --- .../data/defaultProfile/DefaultProfileTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/test/java/info/nightscout/androidaps/data/defaultProfile/DefaultProfileTest.kt b/app/src/test/java/info/nightscout/androidaps/data/defaultProfile/DefaultProfileTest.kt index d2afc0d5f3..e97e63bafa 100644 --- a/app/src/test/java/info/nightscout/androidaps/data/defaultProfile/DefaultProfileTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/data/defaultProfile/DefaultProfileTest.kt @@ -13,18 +13,18 @@ class DefaultProfileTest : TestBase() { @Test fun profile() { - var p = DefaultProfile(injector).profile(5.0, 5.1 / 0.3, 0.0, Constants.MGDL) - assertEquals(0.150, p.getBasalTimeFromMidnight(0), 0.001) + var p = DefaultProfile(injector).profile(5.0, 5.1 / 0.3, 0.0, Constants.MMOL) + assertEquals(0.150, p!!.getBasalTimeFromMidnight(0), 0.001) assertEquals(15.0, p.getIcTimeFromMidnight(0), 0.001) assertEquals(11.8, p.getIsfTimeFromMidnight(0), 0.001) - p = DefaultProfile(injector).profile(7.0, 10.0 / 0.4, 0.0, Constants.MGDL) - assertEquals(0.350, p.getBasalTimeFromMidnight(0), 0.001) + p = DefaultProfile(injector).profile(7.0, 10.0 / 0.4, 0.0, Constants.MMOL) + assertEquals(0.350, p!!.getBasalTimeFromMidnight(0), 0.001) assertEquals(15.0, p.getIcTimeFromMidnight(0), 0.001) assertEquals(6.8, p.getIsfTimeFromMidnight(0), 0.001) - p = DefaultProfile(injector).profile(12.0, 25.0 / 0.5, 0.0, Constants.MGDL) - assertEquals(0.80, p.getBasalTimeFromMidnight(0), 0.001) + p = DefaultProfile(injector).profile(12.0, 25.0 / 0.5, 0.0, Constants.MMOL) + assertEquals(0.80, p!!.getBasalTimeFromMidnight(0), 0.001) assertEquals(10.0, p.getIcTimeFromMidnight(0), 0.001) assertEquals(2.2, p.getIsfTimeFromMidnight(0), 0.001) }