use of javax.validation.ValidatorFactory in project tutorials by eugenp.
the class ContainerValidationIntegrationTest method setup.
@Before
public void setup() {
ValidatorFactory factory = Validation.byDefaultProvider().configure().addValueExtractor(new ProfileValueExtractor()).buildValidatorFactory();
validator = factory.getValidator();
}
use of javax.validation.ValidatorFactory in project tutorials by eugenp.
the class ValidationIntegrationTest method setup.
@Before
public void setup() {
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
validator = factory.getValidator();
}
use of javax.validation.ValidatorFactory in project tutorials by eugenp.
the class ValidationIntegrationTest method getExecutableValidator.
@Before
public void getExecutableValidator() {
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
this.executableValidator = factory.getValidator().forExecutables();
}
use of javax.validation.ValidatorFactory in project service-authorization by reportportal.
the class AbstractLdapConfigTest method checkValidation.
@Test
public void checkValidation() {
ValidatorFactory vf = Validation.buildDefaultValidatorFactory();
Validator validator = vf.getValidator();
LdapConfig cfg = new LdapConfig();
cfg.setEnabled(true);
cfg.setBaseDn("someDN");
cfg.setUrl("ldaps://localhost");
Set<ConstraintViolation<LdapConfig>> violations = validator.validate(cfg);
if (!violations.isEmpty()) {
LOGGER.error("Violations found: " + Joiner.on("\n").join(violations));
}
Assert.assertThat(violations, Matchers.empty());
}
use of javax.validation.ValidatorFactory in project service-authorization by reportportal.
the class AbstractAuthSequenceProviderTest method setUp.
@BeforeClass
public static void setUp() {
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
validator = factory.getValidator();
}
Aggregations