Skip to content

Commit 0405b20

Browse files
committed
Fix event stream codegen test templates
1 parent 5e2855c commit 0405b20

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/codegen/event-stream/build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,14 @@ fun fillInModel(test: CodegenTest) {
8383
}
8484

8585
val replaced = model
86-
.replace("{protocol-name}", test.protocolName!!)
87-
.replace("{op-traits}", opTraits)
86+
.replace(
87+
"{protocol-name}",
88+
test.protocolName ?: throw IllegalStateException("Please specify a protocol name for the codegen test"),
89+
)
90+
.replace(
91+
"{op-traits}",
92+
opTraits,
93+
)
8894

8995
modelFile.parentFile.mkdirs()
9096
modelFile.writeText(replaced)

0 commit comments

Comments
 (0)