From 57eb7443a638493d1c81672a29fb712eb1b99b4a Mon Sep 17 00:00:00 2001 From: Anyul Rivas Date: Thu, 14 Mar 2024 09:23:01 +0100 Subject: [PATCH] test: modify assertion for increasing readability. --- .../springframework/samples/petclinic/model/ValidatorTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java b/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java index 9fcd5987a..ae4063d67 100644 --- a/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java +++ b/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java @@ -53,7 +53,7 @@ class ValidatorTests { assertThat(constraintViolations).hasSize(1); ConstraintViolation violation = constraintViolations.iterator().next(); - assertThat(violation.getPropertyPath().toString()).isEqualTo("firstName"); + assertThat(violation.getPropertyPath().toString()).hasToString("firstName"); assertThat(violation.getMessage()).isEqualTo("must not be blank"); }