Search in sources :

Example 1 with USPhoneValidator

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

the class TestValidationTransformation method testUSPhoneValidator.

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

Aggregations

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