File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
package io.github.typesafegithub.workflows.actionbindinggenerator
2
2
3
3
import io.github.typesafegithub.workflows.actionbindinggenerator.generation.ActionBinding
4
- import io.kotest.assertions.fail
4
+ import io.kotest.matchers.Matcher.Companion.failure
5
5
import io.kotest.matchers.shouldBe
6
6
import java.nio.file.Paths
7
7
@@ -27,10 +27,11 @@ fun List<ActionBinding>.shouldContainAndMatchFile(path: String) {
27
27
actualContent shouldBe expectedContent
28
28
} else if (actualContent != expectedContent) {
29
29
file.writeText(actualContent)
30
- fail(
31
- " The binding's Kotlin code in ${file.name} doesn't match the expected one.\n " +
32
- " The file has been updated to match what's expected." ,
33
- )
30
+ actualContent shouldBe
31
+ failure<Nothing >(
32
+ " The binding's Kotlin code in ${file.name} doesn't match the expected one.\n " +
33
+ " The file has been updated to match what's expected." ,
34
+ )
34
35
}
35
36
}
36
37
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import io.github.typesafegithub.workflows.actionbindinggenerator.typing.IntegerW
16
16
import io.github.typesafegithub.workflows.actionbindinggenerator.typing.ListOfTypings
17
17
import io.github.typesafegithub.workflows.actionbindinggenerator.typing.StringTyping
18
18
import io.github.typesafegithub.workflows.actionbindinggenerator.typing.Typing
19
+ import io.kotest.assertions.assertSoftly
19
20
import io.kotest.core.spec.style.FunSpec
20
21
import io.kotest.matchers.collections.shouldHaveSize
21
22
@@ -221,8 +222,10 @@ class GenerationTest :
221
222
)
222
223
223
224
// then
224
- binding.shouldContainAndMatchFile(" ActionWithAllTypesOfInputs.kt" )
225
- binding.shouldContainAndMatchFile(" ActionWithAllTypesOfInputs_Untyped.kt" )
225
+ assertSoftly {
226
+ binding.shouldContainAndMatchFile(" ActionWithAllTypesOfInputs.kt" )
227
+ binding.shouldContainAndMatchFile(" ActionWithAllTypesOfInputs_Untyped.kt" )
228
+ }
226
229
}
227
230
228
231
test(" action with outputs" ) {
@@ -471,8 +474,10 @@ class GenerationTest :
471
474
)
472
475
473
476
// then
474
- binding.shouldContainAndMatchFile(" ActionWithPartlyTypings.kt" )
475
- binding.shouldContainAndMatchFile(" ActionWithPartlyTypings_Untyped.kt" )
477
+ assertSoftly {
478
+ binding.shouldContainAndMatchFile(" ActionWithPartlyTypings.kt" )
479
+ binding.shouldContainAndMatchFile(" ActionWithPartlyTypings_Untyped.kt" )
480
+ }
476
481
}
477
482
})
478
483
You can’t perform that action at this time.
0 commit comments