|
8 | 8 | package ru.nsk.kstatemachine.visitors.export |
9 | 9 |
|
10 | 10 | import io.kotest.core.spec.style.FreeSpec |
11 | | -import io.kotest.data.forAll |
12 | | -import io.kotest.data.headers |
13 | | -import io.kotest.data.row |
14 | | -import io.kotest.data.table |
| 11 | +import io.kotest.datatest.withData |
15 | 12 | import io.kotest.matchers.shouldBe |
16 | 13 | import io.kotest.matchers.types.shouldNotBeInstanceOf |
17 | 14 | import ru.nsk.kstatemachine.* |
@@ -320,11 +317,11 @@ private suspend fun makeChoiceMachine(coroutineStarterType: CoroutineStarterType |
320 | 317 | class ExportPlantUmlVisitorTest : FreeSpec({ |
321 | 318 | CoroutineStarterType.entries.forEach { coroutineStarterType -> |
322 | 319 | "$coroutineStarterType" - { |
323 | | - table( |
324 | | - headers("showEventLabels", "result"), |
325 | | - row(false, PLANTUML_NESTED_STATES_RESULT), |
326 | | - row(true, PLANTUML_NESTED_STATES_SHOW_EVENT_LABELS_RESULT), |
327 | | - ).forAll { showEventLabels, result -> |
| 320 | + withData( |
| 321 | + nameFn = { "showEventLabels ${it.first} result ${it.second}" }, |
| 322 | + false to PLANTUML_NESTED_STATES_RESULT, |
| 323 | + true to PLANTUML_NESTED_STATES_SHOW_EVENT_LABELS_RESULT, |
| 324 | + ) { (showEventLabels, result) -> |
328 | 325 | "plantUml export nested states" { |
329 | 326 | val machine = makeNestedMachine(coroutineStarterType) |
330 | 327 | machine.exportToPlantUml(showEventLabels) shouldBe result |
|
0 commit comments