@@ -50,7 +50,6 @@ public void setUp(ApplicationContext applicationContext, RestDocumentationContex
5050 this .webTestClient = WebTestClient .bindToApplicationContext (applicationContext ).configureClient ()
5151 .filter (documentationConfiguration (restDocumentation ))
5252 .build ();
53-
5453 List <Person > people = new ArrayList <>();
5554 for (int i = 1 ; i <= 100 ; i ++) {
5655 people .add (new Person ("Person@" + i ));
@@ -112,13 +111,13 @@ void handleFindById() {
112111 Person first = this .fetchFirst ();
113112 this .webTestClient
114113 .get ()
115- .uri (API + "/" + first .getId ())
114+ .uri (API + "/" + first .id ())
116115 .accept (MediaType .APPLICATION_JSON )
117116 .exchange ()
118117 .expectStatus ().isOk ()
119118 .expectBody ()
120- .jsonPath ("$.id" ).isEqualTo (first .getId ())
121- .jsonPath ("$.name" ).isEqualTo (first .getName ())
119+ .jsonPath ("$.id" ).isEqualTo (first .id ())
120+ .jsonPath ("$.name" ).isEqualTo (first .name ())
122121 .consumeWith (document ("handle-find-by-id" ,
123122 responseFields (
124123 fieldWithPath ("id" )
@@ -136,7 +135,7 @@ void handleDeleteById() {
136135 Person first = this .fetchFirst ();
137136 this .webTestClient
138137 .delete ()
139- .uri (API + "/" + first .getId ())
138+ .uri (API + "/" + first .id ())
140139 .accept (MediaType .APPLICATION_JSON )
141140 .exchange ()
142141 .expectStatus ().isOk ()
@@ -176,13 +175,13 @@ void handleUpdate() {
176175 Person first = this .fetchFirst ();
177176 this .webTestClient
178177 .put ()
179- .uri (API + "/" + first .getId ())
180- .bodyValue (new Person (first .getId (), "Update" ))
178+ .uri (API + "/" + first .id ())
179+ .bodyValue (new Person (first .id (), "Update" ))
181180 .accept (MediaType .APPLICATION_JSON )
182181 .exchange ()
183182 .expectStatus ().isOk ()
184183 .expectBody ()
185- .jsonPath ("$.id" ).isEqualTo (first .getId ())
184+ .jsonPath ("$.id" ).isEqualTo (first .id ())
186185 .jsonPath ("$.name" ).isEqualTo ("Update" )
187186 .consumeWith (document ("handle-update" ,
188187 responseFields (
@@ -201,8 +200,8 @@ void handleUpdateInvalid() {
201200 Person first = this .fetchFirst ();
202201 this .webTestClient
203202 .put ()
204- .uri (API + "/" + first .getId ())
205- .bodyValue (new Person (first .getId (), "" ))
203+ .uri (API + "/" + first .id ())
204+ .bodyValue (new Person (first .id (), "" ))
206205 .accept (MediaType .APPLICATION_JSON )
207206 .exchange ()
208207 .expectStatus ().isBadRequest ()
@@ -229,7 +228,7 @@ void handleUpdateBadRequest() {
229228 Person first = this .fetchFirst ();
230229 this .webTestClient
231230 .put ()
232- .uri (API + "/" + first .getId ())
231+ .uri (API + "/" + first .id ())
233232 .bodyValue (Optional .empty ())
234233 .accept (MediaType .APPLICATION_JSON )
235234 .exchange ()
@@ -286,5 +285,4 @@ void handleCreateInvalid() {
286285 .expectBody ()
287286 .consumeWith (document ("handle-create-invalid" ));
288287 }
289-
290288}
0 commit comments