-
- All Implemented Interfaces:
-
au.com.dius.pact.core.model.Pact
public final class RequestResponsePact extends BasePact
Pact between a consumer and a provider
-
-
Field Summary
Fields Modifier and Type Field Description private List<Interaction>
interactions
private Provider
provider
private Consumer
consumer
private final Map<String, Object>
metadata
private final PactSource
source
-
Constructor Summary
Constructors Constructor Description RequestResponsePact(Provider provider, Consumer consumer, List<Interaction> interactions, Map<String, Object> metadata, PactSource source)
RequestResponsePact(Provider provider, Consumer consumer, List<Interaction> interactions, Map<String, Object> metadata)
RequestResponsePact(Provider provider, Consumer consumer, List<Interaction> interactions)
RequestResponsePact(Provider provider, Consumer consumer)
-
Method Summary
Modifier and Type Method Description List<Interaction>
getInteractions()
Returns all the interactions of the pact Unit
setInteractions(List<Interaction> interactions)
Returns all the interactions of the pact Provider
getProvider()
Returns the provider of the service for the pact Unit
setProvider(Provider provider)
Returns the provider of the service for the pact Consumer
getConsumer()
Returns the consumer of the service for the pact Unit
setConsumer(Consumer consumer)
Returns the consumer of the service for the pact Map<String, Object>
getMetadata()
Metadata associated with this Pact PactSource
getSource()
The source that this pact was loaded from Pact
sortInteractions()
Returns a pact with the interactions sorted Map<String, Object>
toMap(PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document. Pact
mergeInteractions(List<Interaction> interactions)
Merges all the interactions into this Pact Boolean
isRequestResponsePact()
If this pact is a synchronous request/response pact Ok<RequestResponsePact>
asRequestResponsePact()
Converts this Pact into a concrete V3 HTTP Pact, if able to Err<String>
asMessagePact()
Converts this Pact into a concrete V3 Message Pact, if able to Result<V4Pact, String>
asV4Pact()
Converts this Pact into a concrete V4 Pact final SynchronousRequestResponse
interactionFor(String description, String providerState)
Boolean
equals(Object other)
Integer
hashCode()
-
-
Constructor Detail
-
RequestResponsePact
RequestResponsePact(Provider provider, Consumer consumer, List<Interaction> interactions, Map<String, Object> metadata, PactSource source)
-
RequestResponsePact
RequestResponsePact(Provider provider, Consumer consumer, List<Interaction> interactions, Map<String, Object> metadata)
-
RequestResponsePact
RequestResponsePact(Provider provider, Consumer consumer, List<Interaction> interactions)
-
-
Method Detail
-
getInteractions
List<Interaction> getInteractions()
Returns all the interactions of the pact
-
setInteractions
Unit setInteractions(List<Interaction> interactions)
Returns all the interactions of the pact
-
getProvider
Provider getProvider()
Returns the provider of the service for the pact
-
setProvider
Unit setProvider(Provider provider)
Returns the provider of the service for the pact
-
getConsumer
Consumer getConsumer()
Returns the consumer of the service for the pact
-
setConsumer
Unit setConsumer(Consumer consumer)
Returns the consumer of the service for the pact
-
getMetadata
Map<String, Object> getMetadata()
Metadata associated with this Pact
-
getSource
PactSource getSource()
The source that this pact was loaded from
-
sortInteractions
Pact sortInteractions()
Returns a pact with the interactions sorted
-
toMap
Map<String, Object> toMap(PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document.
-
mergeInteractions
Pact mergeInteractions(List<Interaction> interactions)
Merges all the interactions into this Pact
-
isRequestResponsePact
Boolean isRequestResponsePact()
If this pact is a synchronous request/response pact
-
asRequestResponsePact
Ok<RequestResponsePact> asRequestResponsePact()
Converts this Pact into a concrete V3 HTTP Pact, if able to
-
asMessagePact
Err<String> asMessagePact()
Converts this Pact into a concrete V3 Message Pact, if able to
-
interactionFor
final SynchronousRequestResponse interactionFor(String description, String providerState)
-
-
-
-