-
public class PactDslWithProvider
-
-
Field Summary
Fields Modifier and Type Field Description private final ConsumerPactBuilderconsumerPactBuilderprivate final PactSpecVersionversion
-
Constructor Summary
Constructors Constructor Description PactDslWithProvider(ConsumerPactBuilder consumerPactBuilder, String providerName, PactSpecVersion version)PactDslWithProvider(ConsumerPactBuilder consumerPactBuilder, String providerName)
-
Method Summary
Modifier and Type Method Description final ConsumerPactBuildergetConsumerPactBuilder()final PactSpecVersiongetVersion()final PactDslWithStategiven(String state)Describe the state the provider needs to be in for the pact test to be verified. final PactDslWithStategiven(String state, Map<String, Object> params)Describe the state the provider needs to be in for the pact test to be verified. final PactDslWithStategiven(String state, String firstKey, Object firstValue, Object paramsKeyValuePair)Describe the state the provider needs to be in for the pact test to be verified. final PactDslRequestWithoutPathuponReceiving(String description)Description of the request that is expected to be received final UnitsetDefaultRequestValues(PactDslRequestWithoutPath defaultRequestValues)final UnitsetDefaultResponseValues(PactDslResponse defaultResponseValues)final PactDslWithProvideraddMetadataValue(String key, String value)Adds additional values to the metadata section of the Pact file final PactDslWithProvideraddMetadataValue(String key, JsonValue value)Adds additional values to the metadata section of the Pact file -
-
Constructor Detail
-
PactDslWithProvider
PactDslWithProvider(ConsumerPactBuilder consumerPactBuilder, String providerName, PactSpecVersion version)
-
PactDslWithProvider
PactDslWithProvider(ConsumerPactBuilder consumerPactBuilder, String providerName)
-
-
Method Detail
-
getConsumerPactBuilder
final ConsumerPactBuilder getConsumerPactBuilder()
-
getVersion
final PactSpecVersion getVersion()
-
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, 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)
-
addMetadataValue
final PactDslWithProvider addMetadataValue(String key, String value)
Adds additional values to the metadata section of the Pact file
-
addMetadataValue
final PactDslWithProvider addMetadataValue(String key, JsonValue value)
Adds additional values to the metadata section of the Pact file
-
-
-
-