From 570e3adea52c08b6c05d9290fba0f2a2b6a7ac0e Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Wed, 4 Oct 2023 22:37:55 -0700 Subject: [PATCH] Rewrites TriggerDummyTest with matchers Issue #2745 --- .../plugins/automation/triggers/TriggerDummyTest.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerDummyTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerDummyTest.kt index c0fcd70444..8e2f9da367 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerDummyTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerDummyTest.kt @@ -1,7 +1,7 @@ package app.aaps.plugins.automation.triggers +import kotlin.test.assertIs import org.json.JSONObject -import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test class TriggerDummyTest : TriggerTestBase() { @@ -9,13 +9,13 @@ class TriggerDummyTest : TriggerTestBase() { @Test fun instantiateTest() { var trigger: Trigger? = TriggerDummy(injector).instantiate(JSONObject("{\"data\":{},\"type\":\"info.nightscout.androidaps.plugins.general.automation.triggers.TriggerDummy\"}")) - Assertions.assertTrue(trigger is TriggerDummy) + assertIs(trigger) trigger = TriggerDummy(injector).instantiate(JSONObject("{\"data\":{},\"type\":\"app.aaps.plugins.automation.triggers.TriggerDummy\"}")) - Assertions.assertTrue(trigger is TriggerDummy) + assertIs(trigger) trigger = TriggerDummy(injector).instantiate(JSONObject("{\"data\":{},\"type\":\"TriggerDummy\"}")) - Assertions.assertTrue(trigger is TriggerDummy) + assertIs(trigger) } -} \ No newline at end of file +}