spring-cloud-samples / spring-cloud-contract-samples

Samples for Spring Cloud Contract project
Apache License 2.0
384 stars 311 forks source link

Add pact-messaging example #38

Open schustes opened 6 years ago

schustes commented 6 years ago

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?

OlgaMaciaszek commented 6 years ago

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.