use of org.hibernate.validator.ap.testutil.CompilerTestHelper.Library in project hibernate-validator by hibernate.
the class ConstraintValidationProcessorTest method constraintsAllowedAtJavaMoneyTypes.
@Test
@TestForIssue(jiraKey = "HV-1252")
public void constraintsAllowedAtJavaMoneyTypes() {
File sourceFile = compilerHelper.getSourceFile(ModelWithJavaMoneyTypes.class);
EnumSet<Library> libraries = EnumSet.of(Library.VALIDATION_API, Library.HIBERNATE_VALIDATOR, Library.JAVA_MONEY_API);
boolean compilationResult = compilerHelper.compile(new ConstraintValidationProcessor(), diagnostics, libraries, sourceFile);
assertTrue(compilationResult, "Java Money API types (MonetaryAmount) fails with constraints annotations.");
}
Aggregations