Search in sources :

Example 1 with MyValidatorImpl

use of org.jboss.as.ee.beanvalidation.testprovider.MyValidatorImpl in project wildfly by wildfly.

the class LazyValidatorFactoryTestCase method testSpecificProviderCanBeConfiguredInValidationXml.

@Test
@WithContextClassLoader(TestClassLoader.class)
public void testSpecificProviderCanBeConfiguredInValidationXml() {
    Validator validator = validatorFactory.getValidator();
    assertNotNull("LazyValidatorFactory should provide a validator", validator);
    assertTrue("Validator should be of type created by XML-configured provider", validator instanceof MyValidatorImpl);
}
Also used : MyValidatorImpl(org.jboss.as.ee.beanvalidation.testprovider.MyValidatorImpl) Validator(javax.validation.Validator) Test(org.junit.Test) WithContextClassLoader(org.jboss.as.ee.beanvalidation.testutil.WithContextClassLoader)

Aggregations

Validator (javax.validation.Validator)1 MyValidatorImpl (org.jboss.as.ee.beanvalidation.testprovider.MyValidatorImpl)1 WithContextClassLoader (org.jboss.as.ee.beanvalidation.testutil.WithContextClassLoader)1 Test (org.junit.Test)1