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