Mevlüt Özdemir
02/21/2023, 2:53 PM@BeforeEach
void before(PactVerificationContext context, @LocalServerPort int port) {
context.setTarget(new HttpTestTarget("localhost", port));
}
@TestTemplate
@ExtendWith(PactVerificationSpringProvider.class)
void pactVerificationTestTemplate(PactVerificationContext context) {
context.verifyInteraction();
}
While I could implement a solution using this approach, I don't think it's the most optimal way to solve the problem.
@BeforeEach
void before(PactVerificationContext context, @LocalServerPort int port) {
context.setTarget(new HttpTestTarget("localhost", port));
Request request = ((RequestResponseInteraction) context.getInteraction()).getRequest();
request.setPath(request.getPath().replace("/api/v3", ""));
}
uglyog