Skip to content

Commit

Permalink
Fixed the assertion failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
xianrenzw committed Jan 31, 2025
1 parent 45d81dd commit f046e1c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public void testFailFast() {
// Since failFast is enabled, there should be only one error
assertEquals(1, violations.size());

// Check the error message
// Check the error field
ConstraintViolation<InvalidObject> violation = violations.iterator().next();
assertTrue(violation.getMessage().contains("must not be blank"));
assertEquals("field1", violation.getPropertyPath().toString());
}

// Define a class with multiple validation constraints
Expand Down

0 comments on commit f046e1c

Please sign in to comment.