/** * The path of the request * * @param path string path */ public PactDslRequestWithPath path(String path) { return new PactDslRequestWithPath(consumerPactBuilder, consumerName, providerName, pactDslWithState.state, description, path, requestMethod, requestHeaders, query, requestBody, requestMatchers, requestGenerators, defaultRequestValues, defaultResponseValues); }
/** * The path of the request * * @param path string path */ public PactDslRequestWithPath path(String path) { return new PactDslRequestWithPath(consumerPactBuilder, consumerName, providerName, pactDslWithState.state, description, path, requestMethod, requestHeaders, query, requestBody, requestMatchers, requestGenerators, defaultRequestValues, defaultResponseValues); }
/** * Description of the request that is expected to be received * * @param description request description */ public PactDslRequestWithPath uponReceiving(String description) { addInteraction(); return new PactDslRequestWithPath(consumerPactBuilder, request, description, defaultRequestValues, defaultResponseValues); }
/** * Description of the request that is expected to be received * * @param description request description */ public PactDslRequestWithPath uponReceiving(String description) { addInteraction(); return new PactDslRequestWithPath(consumerPactBuilder, request, description, defaultRequestValues, defaultResponseValues); }
/** * Sets the path to have it's value injected from the provider state * @param expression Expression to be evaluated from the provider state * @param example Example value to use in the consumer test */ public PactDslRequestWithPath pathFromProviderState(String expression, String example) { requestGenerators.addGenerator(Category.PATH, new ProviderStateGenerator(expression)); return new PactDslRequestWithPath(consumerPactBuilder, consumerName, providerName, pactDslWithState.state, description, example, requestMethod, requestHeaders, query, requestBody, requestMatchers, requestGenerators, defaultRequestValues, defaultResponseValues); }
/** * The path of the request * * @param path string path to use when generating requests * @param pathRegex regular expression to use to match paths */ public PactDslRequestWithPath matchPath(String pathRegex, String path) { requestMatchers.addCategory("path").addRule(new RegexMatcher(pathRegex)); return new PactDslRequestWithPath(consumerPactBuilder, consumerName, providerName, pactDslWithState.state, description, path, requestMethod, requestHeaders, query, requestBody, requestMatchers, requestGenerators, defaultRequestValues, defaultResponseValues); }
/** * The path of the request * * @param path string path to use when generating requests * @param pathRegex regular expression to use to match paths */ public PactDslRequestWithPath matchPath(String pathRegex, String path) { requestMatchers.addCategory("path").addRule(new RegexMatcher(pathRegex)); return new PactDslRequestWithPath(consumerPactBuilder, consumerName, providerName, pactDslWithState.state, description, path, requestMethod, requestHeaders, query, requestBody, requestMatchers, requestGenerators, defaultRequestValues, defaultResponseValues); }