Search in sources :

Example 1 with Library

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.");
}
Also used : Library(org.hibernate.validator.ap.testutil.CompilerTestHelper.Library) File(java.io.File) Test(org.testng.annotations.Test) TestForIssue(org.hibernate.validator.testutil.TestForIssue)

Aggregations

File (java.io.File)1 Library (org.hibernate.validator.ap.testutil.CompilerTestHelper.Library)1 TestForIssue (org.hibernate.validator.testutil.TestForIssue)1 Test (org.testng.annotations.Test)1