Search in sources :

Example 1 with USZipCodeValidator

use of com.thinkbiganalytics.policy.validation.USZipCodeValidator in project kylo by Teradata.

the class TestValidationTransformation method testUSZipCodeValidator.

@Test
public void testUSZipCodeValidator() {
    USZipCodeValidator validator = USZipCodeValidator.instance();
    FieldValidationRule uiModel = ValidatorAnnotationTransformer.instance().toUIModel(validator);
    USZipCodeValidator convertedValidator = fromUI(uiModel, USZipCodeValidator.class);
    Assert.assertEquals(validator, convertedValidator);
}
Also used : FieldValidationRule(com.thinkbiganalytics.policy.rest.model.FieldValidationRule) USZipCodeValidator(com.thinkbiganalytics.policy.validation.USZipCodeValidator) Test(org.junit.Test)

Aggregations

FieldValidationRule (com.thinkbiganalytics.policy.rest.model.FieldValidationRule)1 USZipCodeValidator (com.thinkbiganalytics.policy.validation.USZipCodeValidator)1 Test (org.junit.Test)1