@@ -84,7 +84,7 @@ void containsOnlyHeadersWithMissingOne() {
84
84
headers .add ("name2" , "value2" );
85
85
assertThatExceptionOfType (AssertionError .class )
86
86
.isThrownBy (() -> assertThat (headers ).containsOnlyHeaders ("name1" , "name2" , "name3" ))
87
- .withMessageContainingAll ("check headers contains only HTTP headers" ,
87
+ .withMessageContainingAll ("check headers contain only HTTP headers" ,
88
88
"could not find the following element(s)" , "[\" name3\" ]" );
89
89
}
90
90
@@ -96,7 +96,7 @@ void containsOnlyHeadersWithExtraOne() {
96
96
headers .add ("name3" , "value3" );
97
97
assertThatExceptionOfType (AssertionError .class )
98
98
.isThrownBy (() -> assertThat (headers ).containsOnlyHeaders ("name1" , "name2" ))
99
- .withMessageContainingAll ("check headers contains only HTTP headers" ,
99
+ .withMessageContainingAll ("check headers contain only HTTP headers" ,
100
100
"the following element(s) were unexpected" , "[\" name3\" ]" );
101
101
}
102
102
@@ -185,10 +185,10 @@ void hasValueWithNoStringMatch() {
185
185
186
186
@ Test
187
187
void hasValueWithNonPresentHeader () {
188
- HttpHeaders map = new HttpHeaders ();
189
- map .add ("test-header" , "a" );
188
+ HttpHeaders headers = new HttpHeaders ();
189
+ headers .add ("test-header" , "a" );
190
190
assertThatExceptionOfType (AssertionError .class )
191
- .isThrownBy (() -> assertThat (map ).hasValue ("wrong-name" , "a" ))
191
+ .isThrownBy (() -> assertThat (headers ).hasValue ("wrong-name" , "a" ))
192
192
.withMessageContainingAll ("HTTP header" , "test-header" , "wrong-name" );
193
193
}
194
194
@@ -201,19 +201,19 @@ void hasValueWithLongMatch() {
201
201
202
202
@ Test
203
203
void hasValueWithLongMatchOnSecondaryValue () {
204
- HttpHeaders map = new HttpHeaders ();
205
- map .addAll ("header" , List .of ("123" , "456" , "789" ));
204
+ HttpHeaders headers = new HttpHeaders ();
205
+ headers .addAll ("header" , List .of ("123" , "456" , "789" ));
206
206
assertThatExceptionOfType (AssertionError .class )
207
- .isThrownBy (() -> assertThat (map ).hasValue ("header" , 456 ))
207
+ .isThrownBy (() -> assertThat (headers ).hasValue ("header" , 456 ))
208
208
.withMessageContainingAll ("check primary long value for HTTP header 'header'" , "123" , "456" );
209
209
}
210
210
211
211
@ Test
212
212
void hasValueWithNoLongMatch () {
213
- HttpHeaders map = new HttpHeaders ();
214
- map .addAll ("header" , List .of ("123" , "456" , "789" ));
213
+ HttpHeaders headers = new HttpHeaders ();
214
+ headers .addAll ("header" , List .of ("123" , "456" , "789" ));
215
215
assertThatExceptionOfType (AssertionError .class )
216
- .isThrownBy (() -> assertThat (map ).hasValue ("wrong-name" , 456 ))
216
+ .isThrownBy (() -> assertThat (headers ).hasValue ("wrong-name" , 456 ))
217
217
.withMessageContainingAll ("HTTP header" , "header" , "wrong-name" );
218
218
}
219
219
@@ -228,20 +228,20 @@ void hasValueWithInstantMatch() {
228
228
@ Test
229
229
void hasValueWithNoInstantMatch () {
230
230
Instant instant = Instant .now ();
231
- HttpHeaders map = new HttpHeaders ();
232
- map .setInstant ("header" , instant );
231
+ HttpHeaders headers = new HttpHeaders ();
232
+ headers .setInstant ("header" , instant );
233
233
assertThatExceptionOfType (AssertionError .class )
234
- .isThrownBy (() -> assertThat (map ).hasValue ("wrong-name" , instant .minusSeconds (30 )))
234
+ .isThrownBy (() -> assertThat (headers ).hasValue ("wrong-name" , instant .minusSeconds (30 )))
235
235
.withMessageContainingAll ("HTTP header" , "header" , "wrong-name" );
236
236
}
237
237
238
238
@ Test
239
239
void hasValueWithNoInstantMatchOneSecOfDifference () {
240
240
Instant instant = Instant .now ();
241
- HttpHeaders map = new HttpHeaders ();
242
- map .setInstant ("header" , instant );
241
+ HttpHeaders headers = new HttpHeaders ();
242
+ headers .setInstant ("header" , instant );
243
243
assertThatExceptionOfType (AssertionError .class )
244
- .isThrownBy (() -> assertThat (map ).hasValue ("wrong-name" , instant .minusSeconds (1 )))
244
+ .isThrownBy (() -> assertThat (headers ).hasValue ("wrong-name" , instant .minusSeconds (1 )))
245
245
.withMessageContainingAll ("HTTP header" , "header" , "wrong-name" );
246
246
}
247
247
@@ -259,7 +259,7 @@ void hasSingleValueWithSecondaryValues() {
259
259
assertThatExceptionOfType (AssertionError .class )
260
260
.isThrownBy (() -> assertThat (headers ).hasSingleValue ("header" , "first" ))
261
261
.withMessage ("Expected HTTP header 'header' to be present without secondary values, " +
262
- "but found <2> secondary values " );
262
+ "but found <2> secondary value(s) " );
263
263
}
264
264
265
265
@ Test
@@ -276,7 +276,7 @@ void hasSingleValueWithLongMatchButSecondaryValues() {
276
276
assertThatExceptionOfType (AssertionError .class )
277
277
.isThrownBy (() -> assertThat (headers ).hasSingleValue ("header" , 123 ))
278
278
.withMessage ("Expected HTTP header 'header' to be present without secondary values, " +
279
- "but found <2> secondary values " );
279
+ "but found <2> secondary value(s) " );
280
280
}
281
281
282
282
@ Test
@@ -296,7 +296,7 @@ void hasSingleValueWithInstantAndSecondaryValues() {
296
296
assertThatExceptionOfType (AssertionError .class )
297
297
.isThrownBy (() -> assertThat (headers ).hasSingleValue ("header" , instant .minusSeconds (30 )))
298
298
.withMessage ("Expected HTTP header 'header' to be present without secondary values, " +
299
- "but found <1> secondary values " );
299
+ "but found <1> secondary value(s) " );
300
300
}
301
301
302
302
@ Test
0 commit comments