Rewrites InputInsulinTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-04 21:09:08 -07:00
parent d4c3f21bee
commit 6454616c68

View file

@ -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)
}
}
}