Vinicius Gabriel
12/05/2023, 6:11 PMpact:proto
? For example, on my application <http://github.com/x|github.com/x>
, I set a path to <http://github.com/y/protos|github.com/y/protos>
?rholshausen
12/05/2023, 10:12 PMAnna Nava
01/17/2024, 4:22 PM@Pact(consumer = "consumerService")
fun createPact(builder: PactBuilder): V4Pact {
val messageFile = loadFileFromJarResource("/events/messages/alert_event.proto")
val currentWorkingDir = System.getProperty("user.dir")
val absolutePath = "$currentWorkingDir/build/extracted-include-protos/contractTest"
return builder
.usingPlugin("protobuf")
.expectsToReceive("an AlertEvent", "core/interaction/message")
.with(
mapOf(
"message.contents" to mapOf(
"pact:proto" to messageFile.path,
"pact:message-type" to "AlertEvent",
"pact:content-type" to "application/protobuf",
"pact:protobuf-config" to mapOf("additionalIncludes" to listOf(absolutePath)),