Skip to content

Instantly share code, notes, and snippets.

Created December 21, 2022 08:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
JUnit5 style pact provider test
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class PactProviderJUnit5Test {
int port;
public void setup(PactVerificationContext context) {
context.setTarget(new HttpTestTarget("localhost", port));
// see:
@State("A running user service")
void setupUserService() {
// no state setup ATM
void pactVerificationTestTemplate(PactVerificationContext context) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment