@@ -208,78 +208,78 @@ interface Response extends Traversable {
208208 }
209209
210210 /**
211- * Declare options available to assert data at a given path.
211+ * Options available to assert the response values at the current path.
212212 */
213213 interface Path extends Traversable {
214214
215215 /**
216- * Assert the given path exists, even if the value is {@code null}.
217- * @return spec to assert the converted entity with
216+ * Verify the given path exists, even if the value is {@code null}.
217+ * @return the same {@code Path} spec for further assertions
218218 */
219219 Path pathExists ();
220220
221221 /**
222222 * Assert the given path does not {@link #pathExists() exist}.
223- * @return spec to assert the converted entity with
223+ * @return the same {@code Path} spec for further assertions
224224 */
225225 Path pathDoesNotExist ();
226226
227227 /**
228228 * Assert a value exists at the given path where the value is any {@code non-null}
229229 * value, possibly an empty array or map.
230- * @return spec to assert the converted entity with
230+ * @return the same {@code Path} spec for further assertions
231231 */
232232 Path valueExists ();
233233
234234 /**
235235 * Assert a value does not {@link #valueExists() exist} at the given path.
236- * @return spec to assert the converted entity with
236+ * @return the same {@code Path} spec for further assertions
237237 */
238238 Path valueDoesNotExist ();
239239
240240 /**
241241 * Assert the value at the given path does exist but is empty as defined
242242 * in {@link org.springframework.util.ObjectUtils#isEmpty(Object)}.
243- * @return spec to assert the converted entity with
243+ * @return the same {@code Path} spec for further assertions
244244 * @see org.springframework.util.ObjectUtils#isEmpty(Object)
245245 */
246246 Path valueIsEmpty ();
247247
248248 /**
249249 * Assert the value at the given path is not {@link #valueIsEmpty() empty}.
250- * @return spec to assert the converted entity with
250+ * @return the same {@code Path} spec for further assertions
251251 */
252252 Path valueIsNotEmpty ();
253253
254254 /**
255255 * Convert the data at the given path to the target type.
256256 * @param entityType the type to convert to
257257 * @param <D> the target entity type
258- * @return spec to assert the converted entity with
258+ * @return an {@code Entity} spec to verify the decoded value with
259259 */
260260 <D > Entity <D , ?> entity (Class <D > entityType );
261261
262262 /**
263263 * Convert the data at the given path to the target type.
264264 * @param entityType the type to convert to
265265 * @param <D> the target entity type
266- * @return spec to assert the converted entity with
266+ * @return an {@code Entity} spec to verify the decoded value with
267267 */
268268 <D > Entity <D , ?> entity (ParameterizedTypeReference <D > entityType );
269269
270270 /**
271271 * Convert the data at the given path to a List of the target type.
272272 * @param elementType the type of element to convert to
273273 * @param <D> the target entity type
274- * @return spec to assert the converted List of entities with
274+ * @return an {@code EntityList} spec to verify the decoded values with
275275 */
276276 <D > EntityList <D > entityList (Class <D > elementType );
277277
278278 /**
279279 * Convert the data at the given path to a List of the target type.
280280 * @param elementType the type to convert to
281281 * @param <D> the target entity type
282- * @return spec to assert the converted List of entities with
282+ * @return an {@code EntityList} spec to verify the decoded values with
283283 */
284284 <D > EntityList <D > entityList (ParameterizedTypeReference <D > elementType );
285285
@@ -291,7 +291,7 @@ interface Path extends Traversable {
291291 * <a href="https://jsonassert.skyscreamer.org/">JSONassert</a> library on to be
292292 * on the classpath.
293293 * @param expectedJson the expected JSON
294- * @return spec to specify a different path
294+ * @return {@code Traversable} spec to select a different path
295295 * @see org.springframework.test.util.JsonExpectationsHelper#assertJsonEqual(String,
296296 * String)
297297 */
@@ -303,7 +303,7 @@ interface Path extends Traversable {
303303 * of formatting, along with lenient checking, e.g. extensible and non-strict
304304 * array ordering.
305305 * @param expectedJson the expected JSON
306- * @return spec to specify a different path
306+ * @return {@code Traversable} spec to select a different path
307307 * @see org.springframework.test.util.JsonExpectationsHelper#assertJsonEqual(String,
308308 * String, boolean)
309309 */
@@ -312,121 +312,114 @@ interface Path extends Traversable {
312312 }
313313
314314 /**
315- * Declare options available to assert data converted to an entity.
315+ * Contains a decoded entity and provides options to assert it
316316 *
317317 * @param <D> the entity type
318- * @param <S> the spec type, including subtypes
318+ * @param <S> the {@code Entity} spec type
319319 */
320320 interface Entity <D , S extends Entity <D , S >> extends Traversable {
321321
322322 /**
323- * Assert the converted entity equals the given Object.
324- * @param expected the expected Object
325- * @param <T> the spec type
326- * @return the same spec for more assertions
323+ * Verify the decoded entity is equal to the given value.
324+ * @param expected the expected value
325+ * @return the {@code Entity} spec for further assertions
327326 */
328327 <T extends S > T isEqualTo (Object expected );
329328
330329 /**
331- * Assert the converted entity does not equal the given Object.
332- * @param other the Object to check against
333- * @param <T> the spec type
334- * @return the same spec for more assertions
330+ * Verify the decoded entity is not equal to the given value.
331+ * @param other the value to check against
332+ * @return the {@code Entity} spec for further assertions
335333 */
336334 <T extends S > T isNotEqualTo (Object other );
337335
338336 /**
339- * Assert the converted entity is the same instance as the given Object.
340- * @param expected the expected Object
341- * @param <T> the spec type
342- * @return the same spec for more assertions
337+ * Verify the decoded entity is the same instance as the given value.
338+ * @param expected the expected value
339+ * @return the {@code Entity} spec for further assertions
343340 */
344341 <T extends S > T isSameAs (Object expected );
345342
346343 /**
347- * Assert the converted entity is not the same instance as the given Object.
348- * @param other the Object to check against
349- * @param <T> the spec type
350- * @return the same spec for more assertions
344+ * Verify the decoded entity is not the same instance as the given value.
345+ * @param other the value to check against
346+ * @return the {@code Entity} spec for further assertions
351347 */
352348 <T extends S > T isNotSameAs (Object other );
353349
354350 /**
355- * Assert the converted entity matches the given predicate.
356- * @param predicate the expected Object
357- * @param <T> the spec type
358- * @return the same spec for more assertions
351+ * Verify the decoded entity matches the given predicate.
352+ * @param predicate the predicate to apply
353+ * @return the {@code Entity} spec for further assertions
359354 */
360355 <T extends S > T matches (Predicate <D > predicate );
361356
362357 /**
363- * Perform any assertions on the converted entity, e.g. via AssertJ.
364- * @param consumer the consumer to inspect the entity with
365- * @param <T> the spec type
366- * @return the same spec for more assertions
358+ * Verify the entity with the given {@link Consumer}.
359+ * @param consumer the consumer to apply
360+ * @return the {@code Entity} spec for further assertions
367361 */
368362 <T extends S > T satisfies (Consumer <D > consumer );
369363
370364 /**
371- * Return the converted entity.
372- * @return the converter entity
365+ * Return the decoded entity value(s).
373366 */
374367 D get ();
375368
376369 }
377370
378371 /**
379- * Extension of {@link Entity} with options available to assert data converted to
380- * a List of entities.
372+ * Contains a List of decoded entities and provides options to assert them.
381373 *
382374 * @param <E> the type of elements in the list
383375 */
384376 interface EntityList <E > extends Entity <List <E >, EntityList <E >> {
385377
386378 /**
387- * Assert the list contains the given elements .
388- * @param elements values that are expected
389- * @return the same spec for more assertions
379+ * Verify the list contains the given values, in any order .
380+ * @param values values that are expected
381+ * @return the {@code EntityList} spec for further assertions
390382 */
391383 @ SuppressWarnings ("unchecked" )
392- EntityList <E > contains (E ... elements );
384+ EntityList <E > contains (E ... values );
393385
394386 /**
395- * Assert the list does not contain the given elements .
396- * @param elements values that are not expected
397- * @return the same spec for more assertions
387+ * Verify the list does not contain the given values .
388+ * @param values the values that are not expected
389+ * @return the {@code EntityList} spec for further assertions
398390 */
399391 @ SuppressWarnings ("unchecked" )
400- EntityList <E > doesNotContain (E ... elements );
392+ EntityList <E > doesNotContain (E ... values );
401393
402394 /**
403- * Assert the list contains the given elements.
404- * @param elements values that are expected
405- * @return the same spec for more assertions
395+ * Verify that the list contains exactly the given values and nothing
396+ * else, in the same order.
397+ * @param values the expected values
398+ * @return the {@code EntityList} spec for further assertions
406399 */
407400 @ SuppressWarnings ("unchecked" )
408- EntityList <E > containsExactly (E ... elements );
401+ EntityList <E > containsExactly (E ... values );
409402
410403 /**
411- * Assert the list contains the specified number of elements .
412- * @param size the number of elements expected
413- * @return the same spec for more assertions
404+ * Verify the number of values in the list .
405+ * @param size the expected size
406+ * @return the {@code EntityList} spec for further assertions
414407 */
415408 EntityList <E > hasSize (int size );
416409
417410 /**
418- * Assert the list contains fewer elements than the specified number.
419- * @param boundary the number to compare the number of elements to
420- * @return the same spec for more assertions
411+ * Verify the list has fewer than the number of values .
412+ * @param size the number to compare the actual size to
413+ * @return the {@code EntityList} spec for further assertions
421414 */
422- EntityList <E > hasSizeLessThan (int boundary );
415+ EntityList <E > hasSizeLessThan (int size );
423416
424417 /**
425- * Assert the list contains more elements than the specified number.
426- * @param boundary the number to compare the number of elements to
427- * @return the same spec for more assertions
418+ * Verify the list has more than the specified number of values .
419+ * @param size the number to compare the actual size to
420+ * @return the {@code EntityList} spec for further assertions
428421 */
429- EntityList <E > hasSizeGreaterThan (int boundary );
422+ EntityList <E > hasSizeGreaterThan (int size );
430423
431424 }
432425
0 commit comments