parent
89a9329c6d
commit
efb18e35e3
|
@ -1,20 +1,20 @@
|
||||||
package app.aaps.plugins.automation.actions
|
package app.aaps.plugins.automation.actions
|
||||||
|
|
||||||
|
import kotlin.test.assertIs
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import org.junit.jupiter.api.Assertions
|
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
class ActionDummyTest : ActionsTestBase() {
|
class ActionDummyTest : ActionsTestBase() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun instantiateTest() {
|
fun instantiateTest() {
|
||||||
var action: Action? = ActionDummy(injector).instantiate(JSONObject("{\"type\":\"info.nightscout.androidaps.plugins.general.automation.actions.ActionDummy\"}"))
|
var action: Action? = ActionDummy(injector).instantiate(JSONObject("""{"type":"info.nightscout.androidaps.plugins.general.automation.actions.ActionDummy"}"""))
|
||||||
Assertions.assertTrue(action is ActionDummy)
|
assertIs<ActionDummy>(action)
|
||||||
|
|
||||||
action = ActionDummy(injector).instantiate(JSONObject("{\"type\":\"app.aaps.plugins.automation.actions.ActionDummy\"}"))
|
action = ActionDummy(injector).instantiate(JSONObject("""{"type":"app.aaps.plugins.automation.actions.ActionDummy"}"""))
|
||||||
Assertions.assertTrue(action is ActionDummy)
|
assertIs<ActionDummy>(action)
|
||||||
|
|
||||||
action = ActionDummy(injector).instantiate(JSONObject("{\"type\":\"ActionDummy\"}"))
|
action = ActionDummy(injector).instantiate(JSONObject("""{"type":"ActionDummy"}"""))
|
||||||
Assertions.assertTrue(action is ActionDummy)
|
assertIs<ActionDummy>(action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue