diff --git a/consumer/junit5/src/main/kotlin/au/com/dius/pact/consumer/junit5/PactConsumerTestExt.kt b/consumer/junit5/src/main/kotlin/au/com/dius/pact/consumer/junit5/PactConsumerTestExt.kt index 77c84662e..938980509 100644 --- a/consumer/junit5/src/main/kotlin/au/com/dius/pact/consumer/junit5/PactConsumerTestExt.kt +++ b/consumer/junit5/src/main/kotlin/au/com/dius/pact/consumer/junit5/PactConsumerTestExt.kt @@ -104,7 +104,7 @@ class PactConsumerTestExt : Extension, BeforeTestExecutionCallback, BeforeAllCal .methods .find { AnnotationSupport.isAnnotated(it, TestTemplate::class.java) } - return testTemplate != null && testTemplate.parameters[0].type == V4Interaction.AsynchronousMessage::class.java + return testTemplate != null && testTemplate.parameters[0].type == AsynchronousMessageContext::class.java } override fun provideTestTemplateInvocationContexts(extensionContext: ExtensionContext): Stream { diff --git a/consumer/junit5/src/test/kotlin/au/com/dius/pact/consumer/junit5/TestTemplateTest.kt b/consumer/junit5/src/test/kotlin/au/com/dius/pact/consumer/junit5/TestTemplateTest.kt index 1662653a5..e25a048c8 100644 --- a/consumer/junit5/src/test/kotlin/au/com/dius/pact/consumer/junit5/TestTemplateTest.kt +++ b/consumer/junit5/src/test/kotlin/au/com/dius/pact/consumer/junit5/TestTemplateTest.kt @@ -68,9 +68,9 @@ class TestTemplateTest { } @TestTemplate - fun testPactForReservationBooking(message: V4Interaction.AsynchronousMessage) { - assertThat(message, `is`(notNullValue())) - when (message.description) { + fun testPactForReservationBooking(context: AsynchronousMessageContext) { + assertThat(context.message, `is`(notNullValue())) + when (context.message.description) { "a purchase started message to book a reservation" -> { reservationRan = true }