Saurabh Goel
03/24/2022, 10:16 AMUnable to fetch provider method ...
Matt (pactflow.io / pact-js / pact-go)
@Consumer
annotation on the method - can you still select the correct consumers from the @PactBroker
annotation?Saurabh Goel
03/24/2022, 10:25 AM@Consumer("consumerName")
@Provider("providerName")
public class VcOrderEventsMessagePV extends AbstractOrderChangeNotificationPV {
the parent class containing providerverification methods for all consumers
public class AbstractOrderChangeNotificationPV extends AbstractContractVerifierTest { @BeforeEach
public void beforeEach(PactVerificationContext context) {
LOG.debug("beforeEach({})", context);
setMessageTestTarget(context);
}
@TestTemplate
@ExtendWith(PactVerificationSpringProvider.class)
public void testOrderChangeNotification(Pact pact, Interaction interaction, PactVerificationContext context) {
if (context == null) {
return;
}
context.verifyInteraction();
}
@PactVerifyProvider(ProviderVerificationNames.RESTAURANT_CP_RECEIVED)
public String restaurantPickupOrderReceived() {
return getRestaurantCustomerPickupMessage(RECEIVED);
}
grandparent class containing the methods needed for setting up the system in the correct state
@PactBroker
@IgnoreNoPactsToVerify
@AllowOverridePactUrl
public abstract class AbstractContractVerifierTest extends AbstractOrderEventDrivenTest {
Saurabh Goel
03/24/2022, 10:47 AMMatt (pactflow.io / pact-js / pact-go)
Saurabh Goel
03/24/2022, 11:14 AMuglyog
@Consumer
annotation as Matt saidSaurabh Goel
03/28/2022, 10:51 AM