Skip to content

Commit f289196

Browse files
committed
Migrate to kotest 6.0.7
1 parent 4b280b7 commit f289196

File tree

4 files changed

+14
-21
lines changed

4 files changed

+14
-21
lines changed

buildSrc/src/main/kotlin/ru/nsk/Versions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ object Versions {
2020
const val serialization = "1.9.0"
2121

2222
// test dependencies
23-
const val mockk = "1.14.5"
24-
const val kotest = "5.9.1"
23+
const val mockk = "1.14.7"
24+
const val kotest = "6.0.7"
2525
}

tests/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ kotlin {
2222
implementation(project(":kstatemachine-serialization"))
2323

2424
implementation("io.kotest:kotest-assertions-core:${Versions.kotest}")
25-
implementation("io.kotest:kotest-framework-datatest:${Versions.kotest}")
2625
}
2726
}
2827
jvmTest {

tests/src/commonTest/kotlin/ru/nsk/kstatemachine/statemachine/StateMachineTest.kt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import io.kotest.assertions.throwables.shouldThrow
1111
import io.kotest.assertions.throwables.shouldThrowUnitWithMessage
1212
import io.kotest.assertions.throwables.shouldThrowWithMessage
1313
import io.kotest.core.spec.style.FreeSpec
14-
import io.kotest.data.forAll
15-
import io.kotest.data.headers
16-
import io.kotest.data.row
17-
import io.kotest.data.table
14+
import io.kotest.datatest.withData
1815
import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
1916
import io.kotest.matchers.shouldBe
2017
import io.kotest.matchers.string.shouldEndWith
@@ -387,11 +384,11 @@ class StateMachineTest : FreeSpec({
387384
}
388385
}
389386

390-
table(
391-
headers("stop"),
392-
row(false),
393-
row(true),
394-
).forAll { stop ->
387+
withData(
388+
nameFn = { "stop $it" },
389+
false,
390+
true
391+
) { stop ->
395392
"destroy stopped machine" {
396393
val callbacks = mockkCallbacks()
397394
val machine = createTestStateMachine(coroutineStarterType) {

tests/src/commonTest/kotlin/ru/nsk/kstatemachine/visitors/export/ExportPlantUmlVisitorTest.kt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
package ru.nsk.kstatemachine.visitors.export
99

1010
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
1512
import io.kotest.matchers.shouldBe
1613
import io.kotest.matchers.types.shouldNotBeInstanceOf
1714
import ru.nsk.kstatemachine.*
@@ -320,11 +317,11 @@ private suspend fun makeChoiceMachine(coroutineStarterType: CoroutineStarterType
320317
class ExportPlantUmlVisitorTest : FreeSpec({
321318
CoroutineStarterType.entries.forEach { coroutineStarterType ->
322319
"$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) ->
328325
"plantUml export nested states" {
329326
val machine = makeNestedMachine(coroutineStarterType)
330327
machine.exportToPlantUml(showEventLabels) shouldBe result

0 commit comments

Comments
 (0)