public Pact
Interface to a pact
| Modifier and Type | Method and Description |
|---|---|
boolean |
compatibleTo(Pact other)
If this pact is compatible with the other pact. Pacts are compatible if they have the
same provider and they are the same type
|
Pact |
filterInteractions(java.util.function.Predicate<au.com.dius.pact.model.Interaction> predicate)
Deprecated.
|
Consumer |
getConsumer()
Returns the consumer of the service for the pact
|
java.util.List<au.com.dius.pact.model.Interaction> |
getInteractions()
Returns all the interactions of the pact
|
Provider |
getProvider()
Returns the provider of the service for the pact
|
PactSource |
getSource()
The source that this pact was loaded from
|
void |
mergeInteractions(java.util.List<? extends au.com.dius.pact.model.Interaction> interactions)
Merges all the interactions into this Pact
|
Pact |
sortInteractions()
Returns a pact with the interactions sorted
|
java.util.Map<java.lang.String,?> |
toMap(PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document.
|
Provider getProvider()
Returns the provider of the service for the pact
Consumer getConsumer()
Returns the consumer of the service for the pact
java.util.List<au.com.dius.pact.model.Interaction> getInteractions()
Returns all the interactions of the pact
PactSource getSource()
The source that this pact was loaded from
Pact sortInteractions()
Returns a pact with the interactions sorted
java.util.Map<java.lang.String,?> toMap(PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document.
boolean compatibleTo(Pact other)
If this pact is compatible with the other pact. Pacts are compatible if they have the same provider and they are the same type
void mergeInteractions(java.util.List<? extends au.com.dius.pact.model.Interaction> interactions)
Merges all the interactions into this Pact
interactions - Pact filterInteractions(java.util.function.Predicate<au.com.dius.pact.model.Interaction> predicate)
Returns a new Pact with all the interactions filtered by the provided predicate