Package org.hibernate.validator

Examples of org.hibernate.validator.HibernateValidatorFactory


    }

    @Test
    public void testBootstrapAsServiceDefault() {
        HibernateValidatorFactory factory = (HibernateValidatorFactory) Validation.buildDefaultValidatorFactory();
        Assert.assertNotNull(factory);
    }
View Full Code Here


        validatorFactory = new LazyValidatorFactory(WildFlySecurityManager.getCurrentContextClassLoaderPrivileged());
    }

    @Test
    public void testHibernateValidatorIsUsedAsProviderByDefault() {
        HibernateValidatorFactory hibernateValidatorFactory = validatorFactory.unwrap(HibernateValidatorFactory.class);
        assertNotNull("LazyValidatorFactory should delegate to the HV factory by default", hibernateValidatorFactory);

        Validator validator = validatorFactory.getValidator();
        assertNotNull("LazyValidatorFactory should provide a validator", validator);
    }
View Full Code Here

        return war;
    }

    @Test
    public void testBootstrapAsServiceDefault() {
        HibernateValidatorFactory factory = (HibernateValidatorFactory) Validation.buildDefaultValidatorFactory();
        assertNotNull(factory);
    }
View Full Code Here

  @Test
  public void testUnwrapToPublicTypesSucceeds() {
    ValidatorFactory validatorFactory = Validation.buildDefaultValidatorFactory();

    HibernateValidatorFactory asHibernateValidatorFactory = validatorFactory.unwrap( HibernateValidatorFactory.class );
    assertSame( asHibernateValidatorFactory, validatorFactory );

    Object asObject = validatorFactory.unwrap( Object.class );
    assertSame( asObject, validatorFactory );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.validator.HibernateValidatorFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.