public class ConsumerPactBuilder.PactDslResponse
extends java.lang.Object
| Constructor and Description |
|---|
PactDslResponse(ConsumerPactBuilder.PactDslRequestWithPath existing) |
| Modifier and Type | Method and Description |
|---|---|
ConsumerPactBuilder.PactDslResponse |
body(DslPart body)
Response body to return
|
ConsumerPactBuilder.PactDslResponse |
body(org.json.JSONObject body)
Response body to return
|
ConsumerPactBuilder.PactDslResponse |
body(java.lang.String body)
Response body to return
|
ConsumerPactBuilder.PactDslResponse |
headers(java.util.Map<java.lang.String,java.lang.String> headers)
Response headers to return
|
ConsumerPactBuilder.PactDslResponse |
status(int status)
Response status code
|
au.com.dius.pact.model.PactFragment |
toFragment()
Terminates the DSL and builds a pact fragment to represent the interactions
|
ConsumerPactBuilder.PactDslRequestWithPath |
uponReceiving(java.lang.String description)
Description of the request that is expected to be received
|
public PactDslResponse(ConsumerPactBuilder.PactDslRequestWithPath existing)
public ConsumerPactBuilder.PactDslResponse status(int status)
status - HTTP status codepublic ConsumerPactBuilder.PactDslResponse headers(java.util.Map<java.lang.String,java.lang.String> headers)
headers - key-value pairs of headerspublic ConsumerPactBuilder.PactDslResponse body(java.lang.String body)
body - Response body in string formpublic ConsumerPactBuilder.PactDslResponse body(org.json.JSONObject body)
body - Response body in JSON formpublic ConsumerPactBuilder.PactDslResponse body(DslPart body)
body - Response body built using the Pact body DSLpublic au.com.dius.pact.model.PactFragment toFragment()
public ConsumerPactBuilder.PactDslRequestWithPath uponReceiving(java.lang.String description)
description - request description