elvyssoares

DurationValidatorTest - Original

May 18th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. @Test
  2. public void returnsASetOfErrorsForAnObject() throws Exception {
  3.     if ("en".equals(Locale.getDefault().getLanguage())) {
  4.         final Collection<String> errors =
  5.             ConstraintViolations.format(validator.validate(new Example()));
  6.  
  7.         assertThat(errors)
  8.             .containsOnly(
  9.                 "outOfRange must be between 10 MINUTES and 30 MINUTES",
  10.                 "tooBig must be less than or equal to 30 SECONDS",
  11.                 "tooBigExclusive must be less than 30 SECONDS");
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment