public Pact<I extends Interaction>
Interface to a pact
| Modifier and Type | Method and Description |
|---|---|
boolean |
compatibleTo(Pact<I> 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<I> |
filterInteractions(java.util.function.Predicate<I> predicate)
Deprecated.
|
Consumer |
getConsumer()
Returns the consumer of the service for the pact
|
java.util.List<I> |
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 I> interactions)
Merges all the interactions into this Pact
|
Pact<I> |
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<I> getInteractions()
Returns all the interactions of the pact
PactSource getSource()
The source that this pact was loaded from
Pact<I> 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<I> 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 I> interactions)
Merges all the interactions into this Pact
interactions - Pact<I> filterInteractions(java.util.function.Predicate<I> predicate)
Returns a new Pact with all the interactions filtered by the provided predicate