spring-framework / org.springframework.test.web.client / RequestExpectation

RequestExpectation

interface RequestExpectation : ResponseActions, RequestMatcher, ResponseCreator

An extension of ResponseActions that also implements RequestMatcher and ResponseCreator

While ResponseActions is the API for defining expectations this sub-interface is the internal SPI for matching these expectations to actual requests and for creating responses.

Author
Rossen Stoyanchev

Since
4.3

Functions

hasRemainingCount

abstract fun hasRemainingCount(): Boolean

Whether there is a remaining count of invocations for this expectation.

isSatisfied

abstract fun isSatisfied(): Boolean

Whether the requirements for this request expectation have been met.

Inherited Functions

createResponse

abstract fun createResponse(request: ClientHttpRequest): ClientHttpResponse

Create a response for the given request.

Inheritors

DefaultRequestExpectation

open class DefaultRequestExpectation : RequestExpectation

Default implementation of RequestExpectation that simply delegates to the request matchers and the response creator it contains.