Examples of unwrapMode()


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

  }

  @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

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

  @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

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

      );

      valueContext.setCurrentValidatedValue( value );
      ReturnValueMetaData returnValueMetaData = executableMetaData.getReturnValueMetaData();
      valueContext.appendNode( returnValueMetaData );
      valueContext.setUnwrapMode( returnValueMetaData.unwrapMode() );

      numberOfViolationsOfCurrentGroup +=
          validateConstraintsForGroup(
              validationContext, valueContext, executableMetaData
          );
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.raw.ConstrainedExecutable.unwrapMode()

        beanConfigurations,
        GolfPlayer.class,
        "getHandicap"
    );

    assertEquals( constrainedMethod.unwrapMode(), UnwrapMode.UNWRAP );
  }

  @Test
  @TestForIssue(jiraKey = "HV-925")
  public void testSkipUnwrapValidatedValueOnProperty() throws Exception {
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.raw.ConstrainedExecutable.unwrapMode()

        beanConfigurations,
        GolfPlayer.class,
        "getScore"
    );

    assertEquals( constrainedMethod.unwrapMode(), UnwrapMode.SKIP_UNWRAP );
  }

  @Test
  @TestForIssue(jiraKey = "HV-819")
  public void unwrapValidatedValueOnMethod() throws Exception {
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.raw.ConstrainedExecutable.unwrapMode()

        beanConfigurations,
        GolfPlayer.class,
        "enterTournament"
    );

    assertEquals( constrainedMethod.unwrapMode(), UnwrapMode.UNWRAP );
  }

  @Test
  @TestForIssue(jiraKey = "HV-819")
  public void unwrapValidatedValueOnConstructor() throws Exception {
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.raw.ConstrainedExecutable.unwrapMode()

        beanConfigurations,
        Wrapper.class,
        Object.class
    );

    assertEquals( constrainedConstructor.unwrapMode(), UnwrapMode.UNWRAP );
  }

  @Test
  @TestForIssue(jiraKey = "HV-819")
  public void unwrapValidatedValueOnParameter() throws Exception {
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.raw.ConstrainedField.unwrapMode()

        GolfPlayer.class
    );

    ConstrainedField constrainedField = findConstrainedField( beanConfigurations, GolfPlayer.class, "name" );

    assertEquals( constrainedField.unwrapMode(), UnwrapMode.UNWRAP );
  }

  @Test
  @TestForIssue(jiraKey = "HV-925")
  public void testAutomaticUnwrapValidatedValueOnField() throws Exception {
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.raw.ConstrainedField.unwrapMode()

        GolfPlayer.class
    );

    ConstrainedField constrainedField = findConstrainedField( beanConfigurations, GolfPlayer.class, "nickname" );

    assertEquals( constrainedField.unwrapMode(), UnwrapMode.AUTOMATIC );
  }

  @Test
  @TestForIssue(jiraKey = "HV-819")
  public void unwrapValidatedValueOnProperty() 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.