Search in sources :

Example 1 with EmailValidator

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

the class TestValidationTransformation method testEmailValidator.

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

Aggregations

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