Pact builder for consumer tests for messaging
| Fields inherited from class | Fields |
|---|---|
class BaseBuilder |
COMPACT_MIME_TYPES |
| Type | Name and description |
|---|---|
au.com.dius.pact.model.Consumer |
consumer |
java.util.List |
messages |
au.com.dius.pact.model.Provider |
provider |
java.util.List<au.com.dius.pact.model.ProviderState> |
providerStates |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.lang.Object |
build(groovy.lang.Closure closure) |
|
java.lang.Object |
call(groovy.lang.Closure closure) |
|
PactMessageBuilder |
expectsToReceive(java.lang.String description)Description of the message to be received |
|
PactMessageBuilder |
given(java.lang.String providerState)Provider state required for the message to be produced |
|
PactMessageBuilder |
hasPactWith(java.lang.String provider)Provider that the consumer has a pact with |
|
void |
run(groovy.lang.Closure closure)Execute the given closure for each defined message |
|
PactMessageBuilder |
serviceConsumer(java.lang.String consumer)Service consumer |
|
PactMessageBuilder |
withContent(java.lang.String contentType, groovy.lang.Closure closure)Content of the message |
|
PactMessageBuilder |
withContent(java.util.Map options = [:], groovy.lang.Closure closure)Content of the message |
|
PactMessageBuilder |
withMetaData(java.util.Map metadata)Metadata attached to the message |
| Methods inherited from class | Name |
|---|---|
class BaseBuilder |
build, call |
class Matchers |
and, bool, date, dateExpression, decimal, eachArrayLike, eachLike, equalTo, guid, hexValue, identifier, includesStr, integer, ipAddress, maxLike, minLike, minMaxLike, nullValue, numeric, or, real, regexp, regexp, string, time, timeExpression, timestamp, timestampExpression, url, uuid |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Description of the message to be received
Provider state required for the message to be produced
Provider that the consumer has a pact with
Execute the given closure for each defined message
Service consumer
Content of the message
contentType - optional content type of the messageContent of the message
options - Options for generating the message content:
- contentType: optional content type of the message
- prettyPrint: if the message content should be pretty printedMetadata attached to the message