Skip to content

Commit 4ae5d0d

Browse files
committed
Polishing in RestTestClient reference docs
Closes gh-34428
1 parent f578287 commit 4ae5d0d

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

framework-docs/modules/ROOT/pages/testing/resttestclient.adoc

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
= RestTestClient
33

44
`RestTestClient` is an HTTP client designed for testing server applications. It wraps
5-
Spring's xref:integration/rest-clients.adoc#rest-restclient[`RestClient`] and uses it to perform requests
5+
Spring's xref:integration/rest-clients.adoc#rest-restclient[`RestClient`] and uses it to perform requests,
66
but exposes a testing facade for verifying responses. `RestTestClient` can be used to
77
perform end-to-end HTTP tests. It can also be used to test Spring MVC
8-
applications without a running server via mock server request and response objects.
8+
applications without a running server via MockMvc.
99

1010

1111

@@ -14,7 +14,7 @@ applications without a running server via mock server request and response objec
1414
== Setup
1515

1616
To set up a `RestTestClient` you need to choose a server setup to bind to. This can be one
17-
of several mock server setup choices or a connection to a live server.
17+
of several MockMvc setup choices, or a connection to a live server.
1818

1919

2020

@@ -144,9 +144,7 @@ Kotlin::
144144

145145
In addition to the server setup options described earlier, you can also configure client
146146
options, including base URL, default headers, client filters, and others. These options
147-
are readily available following `bindToServer()`. For all other configuration options,
148-
you need to use `configureClient()` to transition from server to client configuration, as
149-
follows:
147+
are readily available following the initial `bindTo` call, as follows:
150148

151149
[tabs]
152150
======
@@ -155,7 +153,6 @@ Java::
155153
[source,java,indent=0,subs="verbatim,quotes"]
156154
----
157155
client = RestTestClient.bindToController(new TestController())
158-
.configureClient()
159156
.baseUrl("/test")
160157
.build();
161158
----
@@ -165,7 +162,6 @@ Kotlin::
165162
[source,kotlin,indent=0,subs="verbatim,quotes"]
166163
----
167164
client = RestTestClient.bindToController(TestController())
168-
.configureClient()
169165
.baseUrl("/test")
170166
.build()
171167
----
@@ -180,7 +176,7 @@ Kotlin::
180176
`RestTestClient` provides an API identical to xref:integration/rest-clients.adoc#rest-restclient[`RestClient`]
181177
up to the point of performing a request by using `exchange()`.
182178

183-
After the call to `exchange()`, `RestTestClient` diverges from the `RestClient` and
179+
After the call to `exchange()`, `RestTestClient` diverges from `RestClient`, and
184180
instead continues with a workflow to verify responses.
185181

186182
To assert the response status and headers, use the following:
@@ -310,8 +306,7 @@ Kotlin::
310306
======
311307

312308
TIP: When you need to decode to a target type with generics, look for the overloaded methods
313-
that accept
314-
{spring-framework-api}/core/ParameterizedTypeReference.html[`ParameterizedTypeReference`]
309+
that accept{spring-framework-api}/core/ParameterizedTypeReference.html[`ParameterizedTypeReference`]
315310
instead of `Class<T>`.
316311

317312

@@ -346,8 +341,7 @@ Kotlin::
346341
----
347342
======
348343

349-
If you want to ignore the response content, the following releases the content without
350-
any assertions:
344+
If you want to ignore the response content, the following releases the content without any assertions:
351345

352346
[tabs]
353347
======

0 commit comments

Comments
 (0)