use of com.thinkbiganalytics.policy.validation.LengthValidator in project kylo by Teradata.
the class TestValidationTransformation method testLengthValidator.
@Test
public void testLengthValidator() {
Integer min = 10;
Integer max = 20;
LengthValidator validator = new LengthValidator(min, max);
FieldValidationRule uiModel = ValidatorAnnotationTransformer.instance().toUIModel(validator);
LengthValidator convertedValidator = fromUI(uiModel, LengthValidator.class);
Assert.assertEquals(min.intValue(), convertedValidator.getMinLength());
Assert.assertEquals(max.intValue(), convertedValidator.getMaxLength());
}
Aggregations