| Constructor and Description |
|---|
FilteredPact(Pact pact,
java.util.function.Predicate<au.com.dius.pact.model.Interaction> interactionPredicate) |
| 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
|
Pact |
getPact() |
Provider |
getProvider()
Returns the provider of the service for the pact
|
PactSource |
getSource()
The source that this pact was loaded from
|
boolean |
isFiltered() |
boolean |
isNotFiltered() |
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.
|
java.lang.String |
toString() |
compatibleTo, filterInteractions, getConsumer, getInteractions, getProvider, getSource, mergeInteractions, sortInteractions, toMappublic FilteredPact(Pact pact, java.util.function.Predicate<au.com.dius.pact.model.Interaction> interactionPredicate)
public java.util.List<au.com.dius.pact.model.Interaction> getInteractions()
Returns all the interactions of the pact
public boolean isNotFiltered()
public boolean isFiltered()
public java.lang.String toString()
public Pact getPact()
public Consumer getConsumer()
Returns the consumer of the service for the pact
public Provider getProvider()
Returns the provider of the service for the pact
public PactSource getSource()
The source that this pact was loaded from
public 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
public 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
public void mergeInteractions(java.util.List<? extends au.com.dius.pact.model.Interaction> interactions)
Merges all the interactions into this Pact
interactions - public Pact sortInteractions()
Returns a pact with the interactions sorted
public java.util.Map<java.lang.String,?> toMap(PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document.