-
public class PactDslWithState
-
-
Field Summary
Fields Modifier and Type Field Description private List<ProviderState>
state
private final List<String>
comments
private String
consumerName
private String
providerName
private final PactSpecVersion
version
-
Constructor Summary
Constructors Constructor Description PactDslWithState(ConsumerPactBuilder consumerPactBuilder, String consumerName, String providerName, PactDslRequestWithoutPath defaultRequestValues, PactDslResponse defaultResponseValues, PactSpecVersion version)
-
Method Summary
Modifier and Type Method Description final PactDslRequestWithoutPath
uponReceiving(String description)
Description of the request that is expected to be received final PactDslWithState
given(String stateDesc)
Adds another provider state to this interaction final PactDslWithState
given(String stateDesc, Map<String, Object> params)
Adds another provider state to this interaction final PactDslWithState
comment(String comment)
Adds a comment to this interaction final List<ProviderState>
getState()
final List<String>
getComments()
final String
getConsumerName()
final String
getProviderName()
final PactSpecVersion
getVersion()
final Unit
setState(@JvmField() List<ProviderState> state)
final Unit
setConsumerName(String consumerName)
final Unit
setProviderName(String providerName)
-
-
Constructor Detail
-
PactDslWithState
PactDslWithState(ConsumerPactBuilder consumerPactBuilder, String consumerName, String providerName, PactDslRequestWithoutPath defaultRequestValues, PactDslResponse defaultResponseValues, PactSpecVersion version)
-
-
Method Detail
-
uponReceiving
final PactDslRequestWithoutPath uponReceiving(String description)
Description of the request that is expected to be received
- Parameters:
description
- request description
-
given
final PactDslWithState given(String stateDesc)
Adds another provider state to this interaction
- Parameters:
stateDesc
- Description of the state
-
given
final PactDslWithState given(String stateDesc, Map<String, Object> params)
Adds another provider state to this interaction
- Parameters:
stateDesc
- Description of the stateparams
- State data parameters
-
comment
final PactDslWithState comment(String comment)
Adds a comment to this interaction
-
getComments
final List<String> getComments()
-
getConsumerName
final String getConsumerName()
-
getProviderName
final String getProviderName()
-
getVersion
final PactSpecVersion getVersion()
-
setConsumerName
final Unit setConsumerName(String consumerName)
-
setProviderName
final Unit setProviderName(String providerName)
-
-
-
-