@Test public void testCheckValidBigInteger() { MaxBean bean = new MaxBean(); Set<ConstraintViolation<MaxBean>> violations; ConstraintViolation<MaxBean> violation; bean.bigIntegerProperty().set(BigInteger.valueOf(2L) ); violations = validator.validate(bean); assertEquals(violations.size(), 1); violation = violations.iterator().next(); assertEquals(violation.getPropertyPath().iterator().next().getName(), "bigInteger", "2 is more than 1"); bean.bigIntegerProperty().set(BigInteger.valueOf(1L) ); violations = validator.validate(bean); assertEquals(violations.size(), 0, "1 is equal to 1"); bean.bigIntegerProperty().set(BigInteger.valueOf(0L)); violations = validator.validate(bean); assertEquals(violations.size(), 0, "0 is less than 1"); }
@Override protected boolean checkValidBigInteger(final BigInteger value) { return value.compareTo(BigInteger.valueOf(maxValue) ) != 1; }
MaxPropertyValidator extends AbstractNumberValidator<Max> { @Override protected boolean checkValidBigInteger(final BigInteger value) { return value.compareTo(BigInteger.valueOf(maxValue) ) != 1; } }
MaxPropertyValidator extends AbstractNumberValidator<Max> { @Override protected boolean checkValidBigInteger(final BigInteger value) { return value.compareTo(BigInteger.valueOf(maxValue) ) != 1; }  }
MaxPropertyValidator extends AbstractNumberValidator<Max> { @Override protected boolean checkValidBigInteger(final BigInteger value) { return value.compareTo(BigInteger.valueOf(maxValue) ) != 1; }  @Override void initialize(final Max constraint); }
MaxPropertyValidator extends AbstractNumberValidator<Max> { @Override protected boolean checkValidBigInteger(final BigInteger value) { return value.compareTo(BigInteger.valueOf(maxValue) ) != 1; }  @Override void initialize(final Max constraint);  }