use of ddf.catalog.validation.report.AttributeValidationReport in project ddf by codice.
the class PatternValidatorTest method validateNoErrors.
private void validateNoErrors(final String value) {
final Optional<AttributeValidationReport> reportOptional = VALIDATOR.validate(new AttributeImpl("test", value));
assertThat(reportOptional.isPresent(), is(false));
}
use of ddf.catalog.validation.report.AttributeValidationReport in project ddf by codice.
the class PatternValidatorTest method validateWithErrors.
private void validateWithErrors(final String value, final int expectedErrors) {
final Optional<AttributeValidationReport> reportOptional = VALIDATOR.validate(new AttributeImpl("test", value));
assertThat(reportOptional.get().getAttributeValidationViolations(), hasSize(expectedErrors));
}
Aggregations