From 53961a41046ba3a5342cbcf06f1baf1004264410 Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Wed, 4 Oct 2023 20:48:06 -0700 Subject: [PATCH] Rewrites LabelWithElementTest with matchers Issue #2745 --- .../automation/elements/LabelWithElementTest.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/LabelWithElementTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/LabelWithElementTest.kt index 612a3abc7b..c173ffff28 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/LabelWithElementTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/elements/LabelWithElementTest.kt @@ -1,16 +1,17 @@ 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 +import kotlin.test.assertIs class LabelWithElementTest : TriggerTestBase() { @Test fun constructorTest() { val l = LabelWithElement(rh, "A", "B", InputInsulin()) - Assertions.assertEquals("A", l.textPre) - Assertions.assertEquals("B", l.textPost) - Assertions.assertEquals(InputInsulin::class.java, l.element!!.javaClass) + assertThat(l.textPre).isEqualTo("A") + assertThat(l.textPost).isEqualTo("B") + assertIs(l.element) } -} \ No newline at end of file +}