Replaces isInstanceOf with assertIs in TriggerConnectorTest
Issue #2745
This commit is contained in:
parent
6421497cd2
commit
4f15a26cc6
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
package info.nightscout.automation.triggers
|
package info.nightscout.automation.triggers
|
||||||
|
|
||||||
import com.google.common.truth.Truth.assertThat
|
import com.google.common.truth.Truth.assertThat
|
||||||
|
import kotlin.test.assertIs
|
||||||
import org.json.JSONException
|
import org.json.JSONException
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
@ -73,7 +74,7 @@ class TriggerConnectorTest : TriggerTestBase() {
|
||||||
t.list.add(TriggerConnector(injector))
|
t.list.add(TriggerConnector(injector))
|
||||||
val t2 = TriggerDummy(injector).instantiate(JSONObject(t.toJSON())) as TriggerConnector
|
val t2 = TriggerDummy(injector).instantiate(JSONObject(t.toJSON())) as TriggerConnector
|
||||||
assertThat(t2.size()).isEqualTo(1)
|
assertThat(t2.size()).isEqualTo(1)
|
||||||
assertThat(t2.list[0]).isInstanceOf(TriggerConnector::class.java)
|
assertIs<TriggerConnector>(t2.list[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue