Skip to content

Instantly share code, notes, and snippets.

Created December 21, 2022 09:19
  • 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?
Spring JUnit5 style provider
public class PactProviderSpringJUnit5Test {
static class Config {
public UserRepository userRepo() {
return new UserRepository();
MockMvc mockMvc;
UserRepository userRepository;
public void setup(PactVerificationContext context) {
context.setTarget(new MockMvcTestTarget(mockMvc));
// 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