Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void returnsASetOfErrorsForAnObject() throws Exception {
- if ("en".equals(Locale.getDefault().getLanguage())) {
- final Collection<String> errors =
- ConstraintViolations.format(validator.validate(new Example()));
- assertThat(errors)
- .containsOnly(
- "outOfRange must be between 10 MINUTES and 30 MINUTES",
- "tooBig must be less than or equal to 30 SECONDS",
- "tooBigExclusive must be less than 30 SECONDS");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment