@Test public void testHasDefault() { when(params.getPredefinedSetOfPages()).thenReturn(PredefinedSetOfPages.EVEN_PAGES); assertTrue(victim.isValid(params, null)); }
@Override public boolean isValid(ExtractPagesParameters value, ConstraintValidatorContext context) { if (value != null) { return value.getPredefinedSetOfPages() != PredefinedSetOfPages.NONE || !value.getPageSelection().isEmpty(); } return true; }
HasSelectedPagesValidator implements ConstraintValidator<HasSelectedPages, ExtractPagesParameters> { @Override public boolean isValid(ExtractPagesParameters value, ConstraintValidatorContext context) { if (value != null) { return value.getPredefinedSetOfPages() != PredefinedSetOfPages.NONE || !value.getPageSelection().isEmpty(); } return true; } }
HasSelectedPagesValidator implements ConstraintValidator<HasSelectedPages, ExtractPagesParameters> { @Override public boolean isValid(ExtractPagesParameters value, ConstraintValidatorContext context) { if (value != null) { return value.getPredefinedSetOfPages() != PredefinedSetOfPages.NONE || !value.getPageSelection().isEmpty(); } return true; }  }
HasSelectedPagesValidator implements ConstraintValidator<HasSelectedPages, ExtractPagesParameters> { @Override public boolean isValid(ExtractPagesParameters value, ConstraintValidatorContext context) { if (value != null) { return value.getPredefinedSetOfPages() != PredefinedSetOfPages.NONE || !value.getPageSelection().isEmpty(); } return true; }  @Override void initialize(HasSelectedPages constraintAnnotation); @Override boolean isValid(ExtractPagesParameters value, ConstraintValidatorContext context); }
HasSelectedPagesValidator implements ConstraintValidator<HasSelectedPages, ExtractPagesParameters> { @Override public boolean isValid(ExtractPagesParameters value, ConstraintValidatorContext context) { if (value != null) { return value.getPredefinedSetOfPages() != PredefinedSetOfPages.NONE || !value.getPageSelection().isEmpty(); } return true; }  @Override void initialize(HasSelectedPages constraintAnnotation); @Override boolean isValid(ExtractPagesParameters value, ConstraintValidatorContext context);  }