From abec26e504fa42774dce0232ff7c41f12afa00cf Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 21 Jan 2026 10:06:02 -0800 Subject: [PATCH] Polish --- .../withmockenvironment/MyMockMvcTests.java | 8 ++++---- .../MyRandomPortRestTestClientAssertJTests.java | 4 ++-- .../MyRandomPortRestTestClientTests.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java b/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java index 3bb1341fc68..c946953361a 100644 --- a/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java +++ b/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java @@ -60,9 +60,9 @@ class MyMockMvcTests { } @Test - void testWithRestTestClient(@Autowired RestTestClient webClient) { + void testWithRestTestClient(@Autowired RestTestClient restClient) { // @formatter:off - webClient + restClient .get().uri("/") .exchange() .expectStatus().isOk() @@ -71,9 +71,9 @@ class MyMockMvcTests { } @Test // If you prefer AssertJ, dedicated assertions are available - void testWithRestTestClientAssertJ(@Autowired RestTestClient webClient) { + void testWithRestTestClientAssertJ(@Autowired RestTestClient restClient) { // @formatter:off - ResponseSpec spec = webClient.get().uri("/").exchange(); + ResponseSpec spec = restClient.get().uri("/").exchange(); RestTestClientResponse response = RestTestClientResponse.from(spec); assertThat(response).hasStatusOk() .bodyText().isEqualTo("Hello World"); diff --git a/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortRestTestClientAssertJTests.java b/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortRestTestClientAssertJTests.java index 653b77c54b2..7bc442913ab 100644 --- a/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortRestTestClientAssertJTests.java +++ b/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortRestTestClientAssertJTests.java @@ -33,9 +33,9 @@ import static org.assertj.core.api.Assertions.assertThat; class MyRandomPortRestTestClientAssertJTests { @Test - void exampleTest(@Autowired RestTestClient webClient) { + void exampleTest(@Autowired RestTestClient restClient) { // @formatter:off - ResponseSpec spec = webClient.get().uri("/").exchange(); + ResponseSpec spec = restClient.get().uri("/").exchange(); RestTestClientResponse response = RestTestClientResponse.from(spec); assertThat(response).hasStatusOk().bodyText().isEqualTo("Hello World"); // @formatter:on diff --git a/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortRestTestClientTests.java b/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortRestTestClientTests.java index 0fe25664816..37589716bdc 100644 --- a/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortRestTestClientTests.java +++ b/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortRestTestClientTests.java @@ -29,9 +29,9 @@ import org.springframework.test.web.servlet.client.RestTestClient; class MyRandomPortRestTestClientTests { @Test - void exampleTest(@Autowired RestTestClient webClient) { + void exampleTest(@Autowired RestTestClient restClient) { // @formatter:off - webClient + restClient .get().uri("/") .exchange() .expectStatus().isOk()