Replaces isInstanceOf with assertIs in TriggerConnectorTest

Issue #2745
This commit is contained in:
Ryan Haining 2023-09-24 22:31:16 -07:00
parent 6421497cd2
commit 4f15a26cc6

View file

@ -1,6 +1,7 @@
package info.nightscout.automation.triggers
import com.google.common.truth.Truth.assertThat
import kotlin.test.assertIs
import org.json.JSONException
import org.json.JSONObject
import org.junit.jupiter.api.Test
@ -73,7 +74,7 @@ class TriggerConnectorTest : TriggerTestBase() {
t.list.add(TriggerConnector(injector))
val t2 = TriggerDummy(injector).instantiate(JSONObject(t.toJSON())) as TriggerConnector
assertThat(t2.size()).isEqualTo(1)
assertThat(t2.list[0]).isInstanceOf(TriggerConnector::class.java)
assertIs<TriggerConnector>(t2.list[0])
}
}