-
public class PactDslWithProvider
-
-
Field Summary
Fields Modifier and Type Field Description private final ConsumerPactBuilder
consumerPactBuilder
private final PactSpecVersion
version
-
Constructor Summary
Constructors Constructor Description PactDslWithProvider(ConsumerPactBuilder consumerPactBuilder, String providerName, PactSpecVersion version)
-
Method Summary
Modifier and Type Method Description final PactDslWithState
given(String state)
Describe the state the provider needs to be in for the pact test to be verified. final PactDslWithState
given(String state, Map<String, Object> params)
Describe the state the provider needs to be in for the pact test to be verified. final PactDslWithState
given(String state, String firstKey, Object firstValue, Array<out Object> paramsKeyValuePair)
Describe the state the provider needs to be in for the pact test to be verified. final PactDslRequestWithoutPath
uponReceiving(String description)
Description of the request that is expected to be received final Unit
setDefaultRequestValues(PactDslRequestWithoutPath defaultRequestValues)
final Unit
setDefaultResponseValues(PactDslResponse defaultResponseValues)
final ConsumerPactBuilder
getConsumerPactBuilder()
final PactSpecVersion
getVersion()
-
-
Constructor Detail
-
PactDslWithProvider
PactDslWithProvider(ConsumerPactBuilder consumerPactBuilder, String providerName, PactSpecVersion version)
-
-
Method Detail
-
given
final PactDslWithState given(String state)
Describe the state the provider needs to be in for the pact test to be verified.
- Parameters:
state
- Provider state
-
given
final PactDslWithState given(String state, Map<String, Object> params)
Describe the state the provider needs to be in for the pact test to be verified.
- Parameters:
state
- Provider stateparams
- Data parameters for the state
-
given
final PactDslWithState given(String state, String firstKey, Object firstValue, Array<out Object> paramsKeyValuePair)
Describe the state the provider needs to be in for the pact test to be verified.
- Parameters:
firstKey
- Key of first parameter elementfirstValue
- Value of first parameter elementparamsKeyValuePair
- Additional parameters in key-value pairs
-
uponReceiving
final PactDslRequestWithoutPath uponReceiving(String description)
Description of the request that is expected to be received
- Parameters:
description
- request description
-
setDefaultRequestValues
final Unit setDefaultRequestValues(PactDslRequestWithoutPath defaultRequestValues)
-
setDefaultResponseValues
final Unit setDefaultResponseValues(PactDslResponse defaultResponseValues)
-
getConsumerPactBuilder
final ConsumerPactBuilder getConsumerPactBuilder()
-
getVersion
final PactSpecVersion getVersion()
-
-
-
-