Rewrites InputPercentTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-04 20:52:59 -07:00
parent 214dae1b24
commit 9f5333645e

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 InputPercentTest : TriggerTestBase() {
@ -9,6 +9,6 @@ class InputPercentTest : TriggerTestBase() {
@Test fun setValueTest() {
val i = InputPercent()
i.value = 10.0
Assertions.assertEquals(10.0, i.value, 0.01)
assertThat(i.value).isWithin(0.01).of(10.0)
}
}