In pact-jvm (groovy on consumer side and gradle on the provider side), I'm trying to use Pact matchers like below:
name regexp(~/\w+/,'sony')
Will Pact matcher regex work only for Strings ? For values other than strings, do I need to use Pact term ?
If the answer is 'yes' for the above two questions. Please explain me how to use Pact term in groovy style.
I have tried using Pact term like below:
date Pact.Term(generate :"02/11/2013", matcher:/\d{2}\/\d{2}\/\d{4}/)
But getting groovy - MethodMissingException. My complete response body for reference:
withBody {
id regexp('[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}','e8cda07e-849f-49c2-94d6-aaa5c4ab7fcd')
name regexp(~/\w+/,'sony')
date Pact.Term(generate :"02/11/2013", matcher:/\d{2}\/\d{2}\/\d{4}/)
}