From b29d45de4b2ebdb263fab129aeff3fc6e5d93922 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 16 Jan 2022 22:30:59 +0100 Subject: [PATCH] fix tests --- .../bgQualityCheck/BgQualityCheckPluginTest.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt index 042606db58..a512a2ce5f 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt @@ -184,15 +184,15 @@ class BgQualityCheckPluginTest : TestBase() { } @Test - fun isLoopInvocationAllowedTest() { + fun applyMaxIOBConstraintsTest() { plugin.state = BgQualityCheckPlugin.State.UNKNOWN - Assert.assertEquals(true, plugin.isLoopInvocationAllowed(Constraint(true)).value()) + Assert.assertEquals(10.0, plugin.applyMaxIOBConstraints(Constraint(10.0)).value(), 0.001) plugin.state = BgQualityCheckPlugin.State.FIVE_MIN_DATA - Assert.assertEquals(true, plugin.isLoopInvocationAllowed(Constraint(true)).value()) + Assert.assertEquals(10.0, plugin.applyMaxIOBConstraints(Constraint(10.0)).value(), 0.001) plugin.state = BgQualityCheckPlugin.State.RECALCULATED - Assert.assertEquals(true, plugin.isLoopInvocationAllowed(Constraint(true)).value()) + Assert.assertEquals(10.0, plugin.applyMaxIOBConstraints(Constraint(10.0)).value(), 0.001) plugin.state = BgQualityCheckPlugin.State.DOUBLED - Assert.assertEquals(false, plugin.isLoopInvocationAllowed(Constraint(true)).value()) + Assert.assertEquals(0.0, plugin.applyMaxIOBConstraints(Constraint(10.0)).value(), 0.001) } } \ No newline at end of file