use of com.thinkbiganalytics.policy.validation.RegexValidator in project kylo by Teradata.
the class TestValidationTransformation method testRegexValidator.
@Test
public void testRegexValidator() {
String regex = ".";
RegexValidator validator = new RegexValidator(regex);
FieldValidationRule uiModel = ValidatorAnnotationTransformer.instance().toUIModel(validator);
RegexValidator convertedValidator = fromUI(uiModel, RegexValidator.class);
Assert.assertEquals(regex, convertedValidator.getRegexExpression());
Assert.assertEquals(regex, convertedValidator.getPattern().pattern());
}
Aggregations