@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); }
@Test @TestForIssue(jiraKey = "HV-256") public void testIsValidDecimalMinExclusive() { 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); }