Search in sources :

Example 1 with AbstractMaxValidator

use of org.hibernate.validator.internal.constraintvalidators.bv.number.bound.AbstractMaxValidator in project hibernate-validator by hibernate.

the class MaxValidatorForNumberTest method testMax.

private void testMax(Max m, boolean inclusive) {
    AbstractMaxValidator constraint = new MaxValidatorForNumber();
    constraint.initialize(m);
    testNumberValidator(constraint, inclusive, true);
    constraint = new MaxValidatorForBigDecimal();
    constraint.initialize(m);
    testValidatorBigDecimal(constraint, inclusive, true);
    constraint = new MaxValidatorForBigInteger();
    constraint.initialize(m);
    testValidatorBigInteger(constraint, inclusive, true);
    constraint = new MaxValidatorForByte();
    constraint.initialize(m);
    testValidatorByte(constraint, inclusive, true);
    constraint = new MaxValidatorForShort();
    constraint.initialize(m);
    testValidatorShort(constraint, inclusive, true);
    constraint = new MaxValidatorForInteger();
    constraint.initialize(m);
    testValidatorInteger(constraint, inclusive, true);
    constraint = new MaxValidatorForLong();
    constraint.initialize(m);
    testValidatorLong(constraint, inclusive, true);
    constraint = new MaxValidatorForFloat();
    constraint.initialize(m);
    testValidatorFloat(constraint, inclusive, true);
    constraint = new MaxValidatorForDouble();
    constraint.initialize(m);
    testValidatorDouble(constraint, inclusive, true);
}
Also used : MaxValidatorForLong(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForLong) DecimalMaxValidatorForLong(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForLong) MaxValidatorForByte(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForByte) DecimalMaxValidatorForByte(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForByte) MaxValidatorForBigInteger(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForBigInteger) DecimalMaxValidatorForBigInteger(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForBigInteger) MaxValidatorForDouble(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForDouble) DecimalMaxValidatorForDouble(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForDouble) MaxValidatorForFloat(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForFloat) DecimalMaxValidatorForFloat(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForFloat) AbstractMaxValidator(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.AbstractMaxValidator) MaxValidatorForBigDecimal(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForBigDecimal) DecimalMaxValidatorForBigDecimal(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForBigDecimal) MaxValidatorForInteger(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForInteger) DecimalMaxValidatorForInteger(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForInteger) DecimalMaxValidatorForNumber(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForNumber) MaxValidatorForNumber(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForNumber) MaxValidatorForShort(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForShort) DecimalMaxValidatorForShort(org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForShort)

Aggregations

AbstractMaxValidator (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.AbstractMaxValidator)1 MaxValidatorForBigDecimal (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForBigDecimal)1 MaxValidatorForBigInteger (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForBigInteger)1 MaxValidatorForByte (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForByte)1 MaxValidatorForDouble (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForDouble)1 MaxValidatorForFloat (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForFloat)1 MaxValidatorForInteger (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForInteger)1 MaxValidatorForLong (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForLong)1 MaxValidatorForNumber (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForNumber)1 MaxValidatorForShort (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.MaxValidatorForShort)1 DecimalMaxValidatorForBigDecimal (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForBigDecimal)1 DecimalMaxValidatorForBigInteger (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForBigInteger)1 DecimalMaxValidatorForByte (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForByte)1 DecimalMaxValidatorForDouble (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForDouble)1 DecimalMaxValidatorForFloat (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForFloat)1 DecimalMaxValidatorForInteger (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForInteger)1 DecimalMaxValidatorForLong (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForLong)1 DecimalMaxValidatorForNumber (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForNumber)1 DecimalMaxValidatorForShort (org.hibernate.validator.internal.constraintvalidators.bv.number.bound.decimal.DecimalMaxValidatorForShort)1