From 3a88e89a80c9ac8eb8b568a5455909504a999b33 Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Wed, 4 Oct 2023 21:51:00 -0700 Subject: [PATCH] Rewrites ActionLoopDisableTest with matchers Issue #2745 --- .../automation/actions/ActionLoopDisableTest.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionLoopDisableTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionLoopDisableTest.kt index 2916e31936..2167e66d0a 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionLoopDisableTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionLoopDisableTest.kt @@ -3,7 +3,7 @@ package app.aaps.plugins.automation.actions import app.aaps.core.interfaces.plugin.PluginType import app.aaps.core.interfaces.queue.Callback import app.aaps.plugins.automation.R -import org.junit.jupiter.api.Assertions +import com.google.common.truth.Truth.assertThat import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.mockito.ArgumentMatchers.eq @@ -27,17 +27,17 @@ class ActionLoopDisableTest : ActionsTestBase() { @Test fun friendlyNameTest() { - Assertions.assertEquals(app.aaps.core.ui.R.string.disableloop, sut.friendlyName()) + assertThat(sut.friendlyName()).isEqualTo(app.aaps.core.ui.R.string.disableloop) } @Test fun shortDescriptionTest() { - Assertions.assertEquals("Disable loop", sut.shortDescription()) + assertThat(sut.shortDescription()).isEqualTo("Disable loop") } @Test fun iconTest() { - Assertions.assertEquals(R.drawable.ic_stop_24dp, sut.icon()) + assertThat(sut.icon()).isEqualTo(R.drawable.ic_stop_24dp) } @Test @@ -60,4 +60,4 @@ class ActionLoopDisableTest : ActionsTestBase() { Mockito.verify(configBuilder, Mockito.times(1)).storeSettings("ActionLoopDisable") Mockito.verify(commandQueue, Mockito.times(1)).cancelTempBasal(eq(true), anyObject()) } -} \ No newline at end of file +}