Package javax.validation.constraints

Examples of javax.validation.constraints.DecimalMin


  @Test
  public void testIsValidDecimalMinValidator() {
    AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
    descriptor.setValue( "value", "1500E-2" );
    descriptor.setValue( "message", "{validator.min}" );
    DecimalMin m = AnnotationFactory.create( descriptor );

    DecimalMinValidatorForCharSequence constraint = new DecimalMinValidatorForCharSequence();
    constraint.initialize( m );
    testMinValidator( constraint, true );
  }
View Full Code Here


  public void testInitializeDecimalMaxWithInvalidValue() {

    AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
    descriptor.setValue( "value", "foobar" );
    descriptor.setValue( "message", "{validator.min}" );
    DecimalMin m = AnnotationFactory.create( descriptor );

    DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
    try {
      constraint.initialize( m );
      fail();
View Full Code Here

    boolean inclusive = false;
    AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
    descriptor.setValue( "value", "1500E-2" );
    descriptor.setValue( "inclusive", inclusive );
    descriptor.setValue( "message", "{validator.min}" );
    DecimalMin m = AnnotationFactory.create( descriptor );

    DecimalMinValidatorForCharSequence constraint = new DecimalMinValidatorForCharSequence();
    constraint.initialize( m );
    testMinValidator( constraint, inclusive );
  }
View Full Code Here

  @Test
  public void testIsValidDecimalMinValidator() {
    AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
    descriptor.setValue( "value", "1500E-2" );
    descriptor.setValue( "message", "{validator.min}" );
    DecimalMin m = AnnotationFactory.create( descriptor );

    DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
    constraint.initialize( m );
    testMinValidator( constraint, true );
  }
View Full Code Here

  @Test
  public void testInitializeDecimalMaxWithInvalidValue() {
    AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
    descriptor.setValue( "value", "foobar" );
    descriptor.setValue( "message", "{validator.min}" );
    DecimalMin m = AnnotationFactory.create( descriptor );

    DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
    try {
      constraint.initialize( m );
      fail();
View Full Code Here

    boolean inclusive = false;
    AnnotationDescriptor<DecimalMin> descriptor = new AnnotationDescriptor<DecimalMin>( DecimalMin.class );
    descriptor.setValue( "value", "1500E-2" );
    descriptor.setValue( "inclusive", inclusive );
    descriptor.setValue( "message", "{validator.min}" );
    DecimalMin m = AnnotationFactory.create( descriptor );

    DecimalMinValidatorForNumber constraint = new DecimalMinValidatorForNumber();
    constraint.initialize( m );
    testMinValidator( constraint, inclusive );
  }
View Full Code Here

TOP

Related Classes of javax.validation.constraints.DecimalMin

Copyright © 2018 www.massapicom. 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.