@@ -6,7 +6,7 @@ import io.github.typesafegithub.workflows.actionbindinggenerator.domain.TypingAc
66import io.github.typesafegithub.workflows.actionbindinggenerator.metadata.Input
77import io.github.typesafegithub.workflows.actionbindinggenerator.metadata.Metadata
88import io.github.typesafegithub.workflows.actionbindinggenerator.metadata.Output
9- import io.github.typesafegithub.workflows.actionbindinggenerator.shouldMatchFile
9+ import io.github.typesafegithub.workflows.actionbindinggenerator.shouldContainAndMatchFile
1010import io.github.typesafegithub.workflows.actionbindinggenerator.typing.BooleanTyping
1111import io.github.typesafegithub.workflows.actionbindinggenerator.typing.EnumTyping
1212import io.github.typesafegithub.workflows.actionbindinggenerator.typing.FloatTyping
@@ -15,7 +15,6 @@ import io.github.typesafegithub.workflows.actionbindinggenerator.typing.IntegerW
1515import io.github.typesafegithub.workflows.actionbindinggenerator.typing.ListOfTypings
1616import io.github.typesafegithub.workflows.actionbindinggenerator.typing.StringTyping
1717import io.kotest.core.spec.style.FunSpec
18- import io.kotest.matchers.collections.shouldHaveSize
1918
2019class GenerationTest :
2120 FunSpec ({
@@ -143,8 +142,7 @@ class GenerationTest :
143142 val binding = coords.generateBinding(metadataRevision = NewestForVersion , metadata = actionManifest)
144143
145144 // then
146- binding shouldHaveSize 1
147- binding.first().shouldMatchFile(" SimpleActionWithRequiredStringInputs.kt" )
145+ binding.shouldContainAndMatchFile(" SimpleActionWithRequiredStringInputs.kt" )
148146 }
149147
150148 test(" action with various combinations of input parameters describing being required or optional" ) {
@@ -189,8 +187,7 @@ class GenerationTest :
189187 val binding = coords.generateBinding(metadataRevision = NewestForVersion , metadata = actionManifest)
190188
191189 // then
192- binding shouldHaveSize 1
193- binding.first().shouldMatchFile(" ActionWithSomeOptionalInputs.kt" )
190+ binding.shouldContainAndMatchFile(" ActionWithSomeOptionalInputs.kt" )
194191 }
195192
196193 test(" action with all types of inputs" ) {
@@ -210,8 +207,7 @@ class GenerationTest :
210207 )
211208
212209 // then
213- binding shouldHaveSize 1
214- binding.first().shouldMatchFile(" ActionWithAllTypesOfInputs.kt" )
210+ binding.shouldContainAndMatchFile(" ActionWithAllTypesOfInputs.kt" )
215211 }
216212
217213 test(" action with outputs" ) {
@@ -241,8 +237,7 @@ class GenerationTest :
241237 val binding = coords.generateBinding(metadataRevision = NewestForVersion , metadata = actionManifest)
242238
243239 // then
244- binding shouldHaveSize 1
245- binding.first().shouldMatchFile(" ActionWithOutputs.kt" )
240+ binding.shouldContainAndMatchFile(" ActionWithOutputs.kt" )
246241 }
247242
248243 test(" action with no inputs" ) {
@@ -261,8 +256,7 @@ class GenerationTest :
261256 val binding = coords.generateBinding(metadataRevision = NewestForVersion , metadata = actionManifest)
262257
263258 // then
264- binding shouldHaveSize 1
265- binding.first().shouldMatchFile(" ActionWithNoInputs.kt" )
259+ binding.shouldContainAndMatchFile(" ActionWithNoInputs.kt" )
266260 }
267261
268262 test(" action with deprecated input resolving to the same Kotlin field name" ) {
@@ -295,8 +289,7 @@ class GenerationTest :
295289 val binding = coords.generateBinding(metadataRevision = NewestForVersion , metadata = actionManifest)
296290
297291 // then
298- binding shouldHaveSize 1
299- binding.first().shouldMatchFile(" ActionWithDeprecatedInputAndNameClash.kt" )
292+ binding.shouldContainAndMatchFile(" ActionWithDeprecatedInputAndNameClash.kt" )
300293 }
301294
302295 test(" action with inputs sharing type" ) {
@@ -343,8 +336,7 @@ class GenerationTest :
343336 )
344337
345338 // then
346- binding shouldHaveSize 1
347- binding.first().shouldMatchFile(" ActionWithInputsSharingType.kt" )
339+ binding.shouldContainAndMatchFile(" ActionWithInputsSharingType.kt" )
348340 }
349341
350342 test(" action with input descriptions with fancy characters" ) {
@@ -371,7 +363,6 @@ class GenerationTest :
371363 val binding = coords.generateBinding(metadataRevision = NewestForVersion , metadata = actionManifest)
372364
373365 // then
374- binding shouldHaveSize 1
375- binding.first().shouldMatchFile(" ActionWithFancyCharsInDocs.kt" )
366+ binding.shouldContainAndMatchFile(" ActionWithFancyCharsInDocs.kt" )
376367 }
377368 })
0 commit comments