public final class MockServerWebExchange extends DefaultServerWebExchange
DefaultServerWebExchange
for use in tests, along with
MockServerHttpRequest
and MockServerHttpResponse
.
See static factory methods to create an instance.
Modifier and Type | Class and Description |
---|---|
static class |
MockServerWebExchange.Builder
Builder for a
MockServerWebExchange . |
LOG_ID_ATTRIBUTE
Modifier and Type | Method and Description |
---|---|
static MockServerWebExchange.Builder |
builder(MockServerHttpRequest.BaseBuilder<?> requestBuilder)
Variant of
builder(MockServerHttpRequest) with a mock request builder. |
static MockServerWebExchange.Builder |
builder(MockServerHttpRequest request)
Create a
MockServerWebExchange.Builder starting with the given mock request. |
static MockServerWebExchange |
from(MockServerHttpRequest.BaseBuilder<?> requestBuilder)
Variant of
from(MockServerHttpRequest) with a mock request builder. |
static MockServerWebExchange |
from(MockServerHttpRequest request)
Create a
MockServerWebExchange from the given mock request. |
MockServerHttpResponse |
getResponse()
Return the current HTTP response.
|
addUrlTransformer, checkNotModified, checkNotModified, checkNotModified, getApplicationContext, getAttributes, getFormData, getLocaleContext, getLogPrefix, getMultipartData, getPrincipal, getRequest, getSession, isNotModified, transformUrl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getAttributeOrDefault, getRequiredAttribute, mutate
public MockServerHttpResponse getResponse()
ServerWebExchange
getResponse
in interface ServerWebExchange
getResponse
in class DefaultServerWebExchange
public static MockServerWebExchange from(MockServerHttpRequest request)
MockServerWebExchange
from the given mock request.request
- the request to use.public static MockServerWebExchange from(MockServerHttpRequest.BaseBuilder<?> requestBuilder)
from(MockServerHttpRequest)
with a mock request builder.requestBuilder
- the builder for the mock request.public static MockServerWebExchange.Builder builder(MockServerHttpRequest request)
MockServerWebExchange.Builder
starting with the given mock request.request
- the request to use.public static MockServerWebExchange.Builder builder(MockServerHttpRequest.BaseBuilder<?> requestBuilder)
builder(MockServerHttpRequest)
with a mock request builder.requestBuilder
- the builder for the mock request.