pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.08k stars 479 forks source link

Add support for setting provider states on `consumer.dsl.PactBuilder` #1646

Open rmartine-ias opened 1 year ago

rmartine-ias commented 1 year ago

When using the plugins framework, it would be useful to be able to add provider states to a pact, so that the provider can correctly set up their tests. (.given() in the consumer legacy DSL as documented here, and @State on the provider side as documented here.)

The PactBuilder class (example usage here) currently does not implement .given(), or an equivalent.

rholshausen commented 1 year ago

/jira ticket

github-actions[bot] commented 1 year ago

👋 Thanks, Jira [PACT-488] ticket created.