From 06b219aadefd96981437b07c12cceae9655ccba7 Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Wed, 4 Oct 2023 20:43:51 -0700 Subject: [PATCH] Rewrites StaticLabelTest with matchers Issue #2745 --- .../aaps/plugins/automation/elements/StaticLabelTest.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/StaticLabelTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/StaticLabelTest.kt index a753926321..c3b59768f1 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/StaticLabelTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/StaticLabelTest.kt @@ -2,7 +2,7 @@ package app.aaps.plugins.automation.elements import app.aaps.plugins.automation.triggers.TriggerDummy 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 import org.mockito.Mockito.`when` @@ -10,9 +10,9 @@ class StaticLabelTest : TriggerTestBase() { @Test fun constructor() { var sl = StaticLabel(rh, "any", TriggerDummy(injector)) - Assertions.assertEquals("any", sl.label) + assertThat(sl.label).isEqualTo("any") `when`(rh.gs(app.aaps.core.ui.R.string.pumplimit)).thenReturn("pump limit") sl = StaticLabel(rh, app.aaps.core.ui.R.string.pumplimit, TriggerDummy(injector)) - Assertions.assertEquals("pump limit", sl.label) + assertThat(sl.label).isEqualTo("pump limit") } -} \ No newline at end of file +}