Package org.hibernate.validator.internal.constraintvalidators.bv

Examples of org.hibernate.validator.internal.constraintvalidators.bv.DecimalMaxValidatorForCharSequence.initialize()


    descriptor.setValue( "value", "15.0E0" );
    descriptor.setValue( "message", "{validator.max}" );
    DecimalMax m = AnnotationFactory.create( descriptor );

    DecimalMaxValidatorForCharSequence constraint = new DecimalMaxValidatorForCharSequence();
    constraint.initialize( m );
    testMaxValidator( constraint, true );
  }

  @Test
  public void testInitializeDecimalMaxWithInvalidValue() {
View Full Code Here


    descriptor.setValue( "inclusive", inclusive );
    descriptor.setValue( "message", "{validator.max}" );
    DecimalMax m = AnnotationFactory.create( descriptor );

    DecimalMaxValidatorForCharSequence constraint = new DecimalMaxValidatorForCharSequence();
    constraint.initialize( m );
    testMaxValidator( constraint, inclusive );
  }

  private void testMaxValidator(ConstraintValidator<?, CharSequence> constraint, boolean inclusive) {
    if ( inclusive ) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.