spring-cloud-contract-samples icon indicating copy to clipboard operation
spring-cloud-contract-samples copied to clipboard

Add pact-messaging example

Open schustes opened this issue 7 years ago • 1 comments

Hello there,

first of all, a great framework and an excellent list of examples. I managed to convert a pact rest contract into a spring contract as given in the example.

I'm trying to do the same for a message contract. The contract gets downloaded but then an error is thrown when the test generation starts. My base test class is annotated with AutoConfigureMessageVerifier

The exception sounds as if it is attempted to convert a rest contract: Caused by: java.lang.NullPointerException: Cannot get property 'serverValue' on null object at org.springframework.cloud.contract.verifier.builder.JUnitMessagingMethodBodyBuilder.validateResponseHeadersBlock(JUnitMessagingMethodBodyBuilder.groovy:138) I'm certainly missing something here, but have no clue what. Any hints?

schustes avatar Oct 31 '18 19:10 schustes

There is no so far. Once this https://github.com/spring-cloud/spring-cloud-contract/issues/796 gets fixed, a sample should be added as well.

OlgaMaciaszek avatar Nov 15 '18 13:11 OlgaMaciaszek