/** * The path of the request. This will generate a random path to use when generating requests * * @param pathRegex string path regular expression to match with */ public PactDslRequestWithPath matchPath(String pathRegex) { return matchPath(pathRegex, new Generex(pathRegex).random()); }
/** * The path of the request. This will generate a random path to use when generating requests * * @param pathRegex string path regular expression to match with */ public PactDslRequestWithPath matchPath(String pathRegex) { return matchPath(pathRegex, new Generex(pathRegex).random()); }
@Pact(consumer="test_consumer") public PactFragment post500(PactDslWithProvider builder) { return builder .given("test state") .uponReceiving("POST Request causing 500") .matchPath("/entity/default.*") .method("POST") .willRespondWith() .status(500) .toFragment(); }
@Pact(consumer="test_consumer") public PactFragment get500(PactDslWithProvider builder) { return builder .given("test state") .uponReceiving("GET Request causing 500") .matchPath("/entity/default.*") .method("GET") .willRespondWith() .status(500) .toFragment(); }
@Pact(consumer="test_consumer") public PactFragment create500(PactDslWithProvider builder) { return builder .given("test state") .uponReceiving("Create Request causing 500") .matchPath("/entity/default.*") .method("POST") .willRespondWith() .status(500) .toFragment(); }