@Test public void large_enough() throws Exception { Field field = mockField(); MessageFormatter formatter = mockMessageFormatter(); Long constraint = 50L; Min validator = new Min(null, mockHtml5Support()); replay(); for (int value = 50; value < 52; value++) validator.validate(field, constraint, formatter, value); verify(); }
public void validate(Field field, Long constraintValue, MessageFormatter formatter, Number value) throws ValidationException { if (value.longValue() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); }
Min extends AbstractValidator<Long, Number> { public void validate(Field field, Long constraintValue, MessageFormatter formatter, Number value) throws ValidationException { if (value.longValue() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); } }
Min extends AbstractValidator<Long, Number> { public void validate(Field field, Long constraintValue, MessageFormatter formatter, Number value) throws ValidationException { if (value.longValue() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); } Min(JavaScriptSupport javaScriptSupport, Html5Support html5Support); }
Min extends AbstractValidator<Long, Number> { public void validate(Field field, Long constraintValue, MessageFormatter formatter, Number value) throws ValidationException { if (value.longValue() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); } Min(JavaScriptSupport javaScriptSupport, Html5Support html5Support); void validate(Field field, Long constraintValue, MessageFormatter formatter, Number value); void render(Field field, Long constraintValue, MessageFormatter formatter, MarkupWriter writer,
                       FormSupport formSupport); }
Min extends AbstractValidator<Long, Number> { public void validate(Field field, Long constraintValue, MessageFormatter formatter, Number value) throws ValidationException { if (value.longValue() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); } Min(JavaScriptSupport javaScriptSupport, Html5Support html5Support); void validate(Field field, Long constraintValue, MessageFormatter formatter, Number value); void render(Field field, Long constraintValue, MessageFormatter formatter, MarkupWriter writer,
                       FormSupport formSupport);  }