Package javax.validation.metadata

Examples of javax.validation.metadata.ElementDescriptor


  }

  @Test
  @TestForIssue(jiraKey = "HV-95")
  public void testElementDescriptorForProperty() {
    ElementDescriptor elementDescriptor = ValidatorUtil.getPropertyDescriptor( Order.class, "orderNumber" );
    Set<ConstraintDescriptor<?>> constraintDescriptors = elementDescriptor.getConstraintDescriptors();
    assertTrue( constraintDescriptors.size() == 1, "There should be a descriptor" );
  }
View Full Code Here


  }

  @Test
  @TestForIssue(jiraKey = "HV-95")
  public void testElementDescriptorImmutable() {
    ElementDescriptor elementDescriptor = ValidatorUtil.getPropertyDescriptor( Order.class, "orderNumber" );
    Set<ConstraintDescriptor<?>> constraintDescriptors = elementDescriptor.getConstraintDescriptors();

    try {
      constraintDescriptors.add( null );
      fail( "Set should be immutable" );
    }
View Full Code Here

TOP

Related Classes of javax.validation.metadata.ElementDescriptor

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.