Skip to content

Commit

Permalink
pact rootDir promoter
Browse files Browse the repository at this point in the history
  • Loading branch information
yacekmm committed Jan 14, 2024
1 parent 3ce6e08 commit c9d43dd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import au.com.dius.pact.core.model.*;
import au.com.dius.pact.core.model.annotations.Pact;
import com.bottega.promoter.concert.fixtures.PricingPactFixtures;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;

Expand All @@ -18,6 +19,12 @@ public class PactFrameworkTestBase extends FrameworkTestBase {
@Autowired
protected PricingPactFixtures pricingPactFixtures;

@BeforeEach
void setUp() {
super.beforeEach();
System.setProperty("pact.rootDir", "build/pacts");
}

@Pact(consumer = CONSUMER_PROMOTER)
public RequestResponsePact applyPercentageDiscount(PactDslWithProvider builder) {
return pricingPactFixtures.applyPercentageDiscount(builder);
Expand Down

0 comments on commit c9d43dd

Please sign in to comment.