/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithPath bodyWithSingleQuotes(String body, String mimeType) { if (body != null) { body = QuoteUtil.convert(body); } return body(body, mimeType); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithoutPath bodyWithSingleQuotes(String body, ContentType mimeType) { if (body != null) { body = QuoteUtil.convert(body); } return body(body, mimeType); }
/** * Attribute that is an array * @param name field name */ public PactDslJsonArray array(String name) { return new PactDslJsonArray(matcherKey(name), name, this); }
@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(); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslResponse bodyWithSingleQuotes(String body) { if (body != null) { body = QuoteUtil.convert(body); } return body(body); }
/** * 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); }
@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(); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithPath bodyWithSingleQuotes(String body, ContentType mimeType) { if (body != null) { body = QuoteUtil.convert(body); } return body(body, mimeType); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslResponse bodyWithSingleQuotes(String body) { if (body != null) { body = QuoteUtil.convert(body); } return body(body); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithoutPath bodyWithSingleQuotes(String body) { if (body != null) { body = QuoteUtil.convert(body); } return body(body); }
/** * Attribute that is an array * @param name field name */ public PactDslJsonArray array(String name) { return new PactDslJsonArray(matcherKey(name), name, this); }
/** * 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); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithPath bodyWithSingleQuotes(String body, String mimeType) { if (body != null) { body = QuoteUtil.convert(body); } return body(body, mimeType); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithoutPath bodyWithSingleQuotes(String body, String mimeType) { if (body != null) { body = QuoteUtil.convert(body); } return body(body, mimeType); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithPath bodyWithSingleQuotes(String body) { if (body != null) { body = QuoteUtil.convert(body); } return body(body); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithoutPath bodyWithSingleQuotes(String body, String mimeType) { if (body != null) { body = QuoteUtil.convert(body); } return body(body, mimeType); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithPath bodyWithSingleQuotes(String body, ContentType mimeType) { if (body != null) { body = QuoteUtil.convert(body); } return body(body, mimeType); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithoutPath bodyWithSingleQuotes(String body, ContentType mimeType) { if (body != null) { body = QuoteUtil.convert(body); } return body(body, mimeType); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithPath bodyWithSingleQuotes(String body) { if (body != null) { body = QuoteUtil.convert(body); } return body(body); }
/** * The body of the request with possible single quotes as delimiters * and using {@link QuoteUtil} to convert single quotes to double quotes if required. * * @param body Request body in string form */ public PactDslRequestWithoutPath bodyWithSingleQuotes(String body) { if (body != null) { body = QuoteUtil.convert(body); } return body(body); }