From 6454616c686cb6741d68fdd79c03351f3e3d9ffb Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Wed, 4 Oct 2023 21:09:08 -0700 Subject: [PATCH] Rewrites InputInsulinTest with matchers Issue #2745 --- .../aaps/plugins/automation/elements/InputInsulinTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/InputInsulinTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/InputInsulinTest.kt index 7aaac4450e..968f904627 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/InputInsulinTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/InputInsulinTest.kt @@ -1,7 +1,7 @@ package app.aaps.plugins.automation.elements import app.aaps.plugins.automation.triggers.TriggerTestBase -import org.junit.jupiter.api.Assertions +import com.google.common.truth.Truth.assertThat import org.junit.jupiter.api.Test class InputInsulinTest : TriggerTestBase() { @@ -9,6 +9,6 @@ class InputInsulinTest : TriggerTestBase() { @Test fun setValueTest() { val i = InputInsulin() i.value = 5.0 - Assertions.assertEquals(5.0, i.value, 0.01) + assertThat(i.value).isWithin(0.01).of(5.0) } -} \ No newline at end of file +}