From 376d29046fef0e75cdb0f1c30ec7c80062d65690 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 27 Nov 2019 19:21:33 +0600 Subject: [PATCH] fix test --- .../com/insanusmokrassar/sdi/DeserializationTest.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/commonTest/kotlin/com/insanusmokrassar/sdi/DeserializationTest.kt b/src/commonTest/kotlin/com/insanusmokrassar/sdi/DeserializationTest.kt index 4947c8a..487d86c 100644 --- a/src/commonTest/kotlin/com/insanusmokrassar/sdi/DeserializationTest.kt +++ b/src/commonTest/kotlin/com/insanusmokrassar/sdi/DeserializationTest.kt @@ -25,16 +25,17 @@ class DeserializationTest { @Test fun test_that_simple_config_correctly_work() { val names = arrayOf("nameOne", "nameTwo") + val controllerName = "controller" val input = """ { "service": [ - "com.insanusmokrassar.sdi.BusinessService", + "${BusinessService::class.qualifiedName}", { "names": ${names.joinToString(prefix = "[", postfix = "]") { "\"$it\"" }} } ], - "controller": [ - "com.insanusmokrassar.sdi.Controller", + "$controllerName": [ + "${Controller::class.qualifiedName}", { "service": "service" } @@ -42,7 +43,7 @@ class DeserializationTest { } """.trimIndent() val module = Json.plain.parse(Module.serializer(), input) - (module["controller"] as ControllerAPI) + (module[controllerName] as ControllerAPI) val controller = (module["controller"] as Controller) assertEquals(names.toList(), controller.service.names) }