Viacheslav Karamov
01/05/2023, 6:27 PM@ExtendWith(PactConsumerTestExt.class)
@Pact(provider = "order_provider", consumer = "order_consumer")
public V4Pact listOfOrdersPact(PactDslWithProvider builder) {
....
@Pact(provider = "order_provider", consumer = "order_consumer")
public V4Pact noOrdersPact(PactDslWithProvider builder) {
...
@Test
@PactTestFor(pactMethod = "listOfOrdersPact")
void getListOfOrders(MockServer mockServer) throws IOException {
...
@Test
@PactTestFor(pactMethod = "noOrdersPact")
void getEmptyListOfOrders(MockServer mockServer) throws IOException {
when I run any of these 2 tests I got an error:
The following methods annotated with @Pact were not executed during the test: OrderApiClientPactTest.noOrdersPact If these are currently a work in progress, add a @Disabled annotation to the method
Commenting out noOrdersPact
and its test fixes the issue. How to fix that?Viacheslav Karamov
01/06/2023, 12:10 PMViacheslav Karamov
01/06/2023, 12:53 PM