public class MessagePact
extends BasePact
Pact for a sequences of messages
| Modifier and Type | Class and Description |
|---|---|
static class |
MessagePact.Companion |
| Modifier and Type | Field and Description |
|---|---|
static MessagePact.Companion |
Companion |
| Constructor and Description |
|---|
MessagePact(Provider provider,
Consumer consumer,
java.util.List<au.com.dius.pact.core.model.messaging.Message> messages,
java.util.Map<java.lang.String,? extends java.lang.Object> metadata,
PactSource source)
Pact for a sequences of messages
|
MessagePact(Provider provider,
Consumer consumer,
java.util.List<au.com.dius.pact.core.model.messaging.Message> messages,
java.util.Map<java.lang.String,? extends java.lang.Object> metadata)
Pact for a sequences of messages
|
MessagePact(Provider provider,
Consumer consumer,
java.util.List<au.com.dius.pact.core.model.messaging.Message> messages)
Pact for a sequences of messages
|
MessagePact(Provider provider,
Consumer consumer)
Pact for a sequences of messages
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
Consumer |
getConsumer()
Returns the consumer of the service for the pact
|
java.util.List<au.com.dius.pact.core.model.messaging.Message> |
getInteractions()
Returns all the interactions of the pact
|
java.util.List<au.com.dius.pact.core.model.messaging.Message> |
getMessages() |
java.util.Map<java.lang.String,java.lang.Object> |
getMetadata() |
Provider |
getProvider()
Returns the provider of the service for the pact
|
PactSource |
getSource()
The source that this pact was loaded from
|
int |
hashCode() |
void |
mergeInteractions(java.util.List<?> interactions)
Merges all the interactions into this Pact
|
MessagePact |
mergePact(Pact<? extends au.com.dius.pact.core.model.Interaction> other) |
java.util.Map<java.lang.String,java.lang.Object> |
mergePacts(java.util.Map<java.lang.String,? extends java.lang.Object> pact,
java.io.File pactFile) |
void |
setMessages(java.util.List<au.com.dius.pact.core.model.messaging.Message> p) |
Pact<au.com.dius.pact.core.model.messaging.Message> |
sortInteractions()
Returns a pact with the interactions sorted
|
java.util.Map<java.lang.String,java.lang.Object> |
toMap(PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document.
|
java.lang.String |
toString() |
compatibleTo, equals, fileForPact, getConsumer, getMetadata, getProvider, getSource, hashCode, lookupVersion, metaData, toString, writecompatibleTo, getConsumer, getInteractions, getProvider, getSource, mergeInteractions, sortInteractions, toMappublic static MessagePact.Companion Companion
public MessagePact(Provider provider, Consumer consumer, java.util.List<au.com.dius.pact.core.model.messaging.Message> messages, java.util.Map<java.lang.String,? extends java.lang.Object> metadata, PactSource source)
Pact for a sequences of messages
provider - Returns the provider of the service for the pactconsumer - Returns the consumer of the service for the pactsource - The source that this pact was loaded frompublic MessagePact(Provider provider, Consumer consumer, java.util.List<au.com.dius.pact.core.model.messaging.Message> messages, java.util.Map<java.lang.String,? extends java.lang.Object> metadata)
Pact for a sequences of messages
provider - Returns the provider of the service for the pactconsumer - Returns the consumer of the service for the pactpublic MessagePact(Provider provider, Consumer consumer, java.util.List<au.com.dius.pact.core.model.messaging.Message> messages)
Pact for a sequences of messages
provider - Returns the provider of the service for the pactconsumer - Returns the consumer of the service for the pactpublic java.util.Map<java.lang.String,java.lang.Object> toMap(PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document.
public java.util.Map<java.lang.String,java.lang.Object> mergePacts(java.util.Map<java.lang.String,? extends java.lang.Object> pact,
java.io.File pactFile)
public void mergeInteractions(java.util.List<?> interactions)
Merges all the interactions into this Pact
interactions - public java.util.List<au.com.dius.pact.core.model.messaging.Message> getInteractions()
Returns all the interactions of the pact
public Pact<au.com.dius.pact.core.model.messaging.Message> sortInteractions()
Returns a pact with the interactions sorted
public MessagePact mergePact(Pact<? extends au.com.dius.pact.core.model.Interaction> other)
public boolean equals(java.lang.Object other)
public int hashCode()
public java.lang.String toString()
public Provider getProvider()
Returns the provider of the service for the pact
public Consumer getConsumer()
Returns the consumer of the service for the pact
public java.util.List<au.com.dius.pact.core.model.messaging.Message> getMessages()
public void setMessages(java.util.List<au.com.dius.pact.core.model.messaging.Message> p)
public java.util.Map<java.lang.String,java.lang.Object> getMetadata()
public PactSource getSource()
The source that this pact was loaded from