public class MessagePact
extends BasePact
Pact for a sequences of messages
public static au.com.dius.pact.core.model.messaging.MessagePact.Companion Companion
@JvmOverloads
public MessagePact(@NotNull
Provider provider,
@NotNull
Consumer consumer,
@NotNull
java.util.List<au.com.dius.pact.core.model.messaging.Message> messages,
@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> metadata,
@NotNull
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 from@JvmOverloads
public MessagePact(@NotNull
Provider provider,
@NotNull
Consumer consumer,
@NotNull
java.util.List<au.com.dius.pact.core.model.messaging.Message> messages,
@NotNull
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 pact@JvmOverloads
public MessagePact(@NotNull
Provider provider,
@NotNull
Consumer consumer,
@NotNull
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 pact@NotNull
public java.util.Map<java.lang.String,java.lang.Object> toMap(@NotNull
PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document.
@NotNull
public java.util.Map<java.lang.String,java.lang.Object> mergePacts(@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> pact,
@NotNull
java.io.File pactFile)
public void mergeInteractions(@NotNull
java.util.List<?> interactions)
Merges all the interactions into this Pact
interactions - @NotNull public java.util.List<au.com.dius.pact.core.model.messaging.Message> getInteractions()
Returns all the interactions of the pact
@NotNull public Pact<au.com.dius.pact.core.model.messaging.Message> sortInteractions()
Returns a pact with the interactions sorted
@NotNull public MessagePact mergePact(@NotNull Pact<? extends au.com.dius.pact.core.model.Interaction> other)
public boolean equals(@Nullable
java.lang.Object other)
public int hashCode()
@NotNull public java.lang.String toString()
@NotNull public Provider getProvider()
Returns the provider of the service for the pact
@NotNull public Consumer getConsumer()
Returns the consumer of the service for the pact
@NotNull public java.util.List<au.com.dius.pact.core.model.messaging.Message> getMessages()
public void setMessages(@NotNull
java.util.List<au.com.dius.pact.core.model.messaging.Message> p)
@NotNull public java.util.Map<java.lang.String,java.lang.Object> getMetadata()
@NotNull public PactSource getSource()
The source that this pact was loaded from