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

DefaultRequestExpectation

open class DefaultRequestExpectation : RequestExpectation

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

Author
Rossen Stoyanchev

Since
4.3

Constructors

<init>

DefaultRequestExpectation(expectedCount: ExpectedCount, requestMatcher: RequestMatcher)

Create a new request expectation that should be called a number of times as indicated by RequestCount.

Functions

andExpect

open fun andExpect(requestMatcher: RequestMatcher): ResponseActions

andRespond

open fun andRespond(responseCreator: ResponseCreator): Unit

createResponse

open fun createResponse(request: ClientHttpRequest): ClientHttpResponse

hasRemainingCount

open fun hasRemainingCount(): Boolean

isSatisfied

open fun isSatisfied(): Boolean

match

open fun match(request: ClientHttpRequest): Unit