Class OutputMessage
java.lang.Object
org.springframework.cloud.contract.spec.internal.Common
org.springframework.cloud.contract.spec.internal.OutputMessage
Represents an output for messaging. Used for verifying the body and headers that are
sent.
- Since:
- 1.0.0
- Author:
- Marcin Grzejszczak, Tim Ysewyn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription$(OptionalProperty property) $(RegexProperty pattern) $(ServerDslProperty property) aBoolean()anyDate()anyEmail()anyHex()anyTime()anyUrl()anyUuid()voidassertThat(String assertThat) voidvoidbody(DslProperty bodyAsValue) voidbodyMatchers(groovy.lang.Closure consumer) The stub matchers part of the contract.voidbodyMatchers(Consumer<ResponseBodyMatchers> consumer) The stub matchers part of the contract.booleangetBody()org.springframework.cloud.contract.spec.internal.OutputMessage.ServerPatternValueDslPropertyinthashCode()voidheaders(groovy.lang.Closure consumer) The message headers part of the contract.voidThe message headers part of the contract.regexProperty(Object object) voidvoidsentTo(DslProperty sentTo) voidsetAssertThat(ExecutionProperty assertThat) voidsetBody(DslProperty body) voidsetBodyMatchers(ResponseBodyMatchers bodyMatchers) voidsetHeaders(Headers headers) voidsetProperty(org.springframework.cloud.contract.spec.internal.OutputMessage.ServerPatternValueDslProperty property) voidsetSentTo(DslProperty<String> sentTo) toString()value(RegexProperty pattern) value(ServerDslProperty serverDslProperty) Methods inherited from class org.springframework.cloud.contract.spec.internal.Common
$, $, $, $, aDouble, alphaNumeric, anInteger, anyBoolean, assertThatSidesMatch, c, client, consumer, convertObjectsToDslProperties, convertObjectsToDslProperties, email, execute, file, file, fileAsBytes, hostname, httpsUrl, ipAddress, iso8601WithOffset, isoDate, isoDateTime, isoTime, named, named, named, nonBlank, nonEmpty, number, onlyAlphaUnicode, optional, p, positiveInt, producer, regex, regex, regex, server, stub, test, toDslProperty, toDslProperty, toDslProperty, toDslProperty, url, uuid, value, value, value, value
-
Constructor Details
-
OutputMessage
public OutputMessage() -
OutputMessage
-
-
Method Details
-
sentTo
-
sentTo
-
body
-
body
-
assertThat
-
value
-
$
-
$
-
$
-
value
-
$
-
regexProperty
- Overrides:
regexPropertyin classCommon
-
getProperty
public org.springframework.cloud.contract.spec.internal.OutputMessage.ServerPatternValueDslProperty getProperty() -
setProperty
public void setProperty(org.springframework.cloud.contract.spec.internal.OutputMessage.ServerPatternValueDslProperty property) -
getSentTo
-
setSentTo
-
getHeaders
-
setHeaders
-
getBody
-
setBody
-
getAssertThat
-
setAssertThat
-
getBodyMatchers
-
setBodyMatchers
-
anyAlphaUnicode
-
anyAlphaNumeric
-
anyNumber
-
anyInteger
-
anyPositiveInt
-
anyDouble
-
anyHex
-
aBoolean
-
anyIpAddress
-
anyHostname
-
anyEmail
-
anyUrl
-
anyHttpsUrl
-
anyUuid
-
anyDate
-
anyDateTime
-
anyTime
-
anyIso8601WithOffset
-
anyNonBlankString
-
anyNonEmptyString
-
anyOf
-
headers
The message headers part of the contract.- Parameters:
consumer- function to manipulate the message headers
-
bodyMatchers
The stub matchers part of the contract.- Parameters:
consumer- function to manipulate the body matchers
-
headers
The message headers part of the contract.- Parameters:
consumer- function to manipulate the message headers
-
bodyMatchers
The stub matchers part of the contract.- Parameters:
consumer- function to manipulate the body matchers
-
equals
-
hashCode
public int hashCode() -
toString
-