Package org.hibernate.validator.internal.metadata.aggregated

Examples of org.hibernate.validator.internal.metadata.aggregated.PropertyMetaData.unwrapMode()


      if ( !propertyPathComplete ) {
        valueContext.appendNode( propertyMetaData );
      }
      // set the unwrapping mode for this validation
      valueContext.setUnwrapMode( propertyMetaData.unwrapMode() );
    }
    else {
      valueContext.appendBeanNode();
    }
View Full Code Here


  }

  @Test
  public void unwrapValidatedValueGivenOnField() {
    PropertyMetaData property = beanMetaDataManager.getBeanMetaData( Customer.class ).getMetaDataFor( "name" );
    assertEquals( property.unwrapMode(), UnwrapMode.UNWRAP );

    property = beanMetaDataManager.getBeanMetaData( Customer.class ).getMetaDataFor( "age" );
    assertEquals( property.unwrapMode(), UnwrapMode.AUTOMATIC );
  }
View Full Code Here

  public void unwrapValidatedValueGivenOnField() {
    PropertyMetaData property = beanMetaDataManager.getBeanMetaData( Customer.class ).getMetaDataFor( "name" );
    assertEquals( property.unwrapMode(), UnwrapMode.UNWRAP );

    property = beanMetaDataManager.getBeanMetaData( Customer.class ).getMetaDataFor( "age" );
    assertEquals( property.unwrapMode(), UnwrapMode.AUTOMATIC );
  }

  @Test
  public void unwrapValidatedValueGivenOnProperty() {
    PropertyMetaData property = beanMetaDataManager.getBeanMetaData( Customer.class ).getMetaDataFor( "firstName" );
View Full Code Here

  }

  @Test
  public void unwrapValidatedValueGivenOnProperty() {
    PropertyMetaData property = beanMetaDataManager.getBeanMetaData( Customer.class ).getMetaDataFor( "firstName" );
    assertEquals( property.unwrapMode(), UnwrapMode.UNWRAP );
  }

  @Test
  public void unwrapValidatedValueGivenOnPropertyInSuperClass() {
    PropertyMetaData property = beanMetaDataManager.getBeanMetaData( RetailCustomer.class )
View Full Code Here

  @Test
  public void unwrapValidatedValueGivenOnPropertyInSuperClass() {
    PropertyMetaData property = beanMetaDataManager.getBeanMetaData( RetailCustomer.class )
        .getMetaDataFor( "firstName" );
    assertEquals( property.unwrapMode(), UnwrapMode.UNWRAP );
  }

  @TestForIssue( jiraKey = "HV-925")
  @Test(expectedExceptions = ConstraintDeclarationException.class, expectedExceptionsMessageRegExp = "HV000189.*")
  public void inconsistent_unwrap_configuration_between_field_and_getter_throws_exception() {
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.