Examples of ValidationExtension


Examples of org.hibernate.validator.internal.cdi.ValidationExtension

  @Inject
  BeanManager beanManager;

  @Test
  public void testInvalidConfigurationThrowsException() {
    ValidationExtension extension = beanManager.getExtension( ValidationExtension.class );
    AnnotatedType<CIA> annotatedType = beanManager.createAnnotatedType( CIA.class );
    try {
      extension.processAnnotatedType( new ProcessAnnotatedTypeImpl<CIA>( annotatedType ) );
      fail(
          "ValidationExtension should throw an exception, because the validated method overrides another " +
              "method and adds @ValidateOnExecution "
      );
    }
View Full Code Here

Examples of org.hibernate.validator.internal.cdi.ValidationExtension

  private BeanManager beanManagerMock;

  @SuppressWarnings("unchecked")
  @Before
  public void setUp() {
    extension = new ValidationExtension();
    afterBeanDiscoveryMock = createMock( AfterBeanDiscovery.class );
    processBeanMock = createMock( ProcessBean.class );
    beanManagerMock = createMock( BeanManager.class );
    validatorFactoryBeanMock = createMock( Bean.class );
    validatorBeanMock = createMock( Bean.class );
View Full Code Here

Examples of org.mongodb.morphia.ValidationExtension

            // To prevent problem during hot-reload
            if (application.isDev()) {
                morphia.getMapper().getOptions().objectFactory = new PlayCreator();
            }
            // Configure validator
            new ValidationExtension(morphia);

            //Check if credentials parameters are present
            if (StringUtils.isBlank(username)) {
                username = morphiaConf.getString(ConfigKey.DB_USERNAME.getKey());
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.