Package org.hibernate.beanvalidation.tck.tests.methodvalidation.model

Examples of org.hibernate.beanvalidation.tck.tests.methodvalidation.model.Customer$Basic


      @SpecAssertion(section = "5.2", id = "h"),
      @SpecAssertion(section = "5.2", id = "i")
  })
  public void testOneViolation() throws Exception {
    Constructor<Customer> constructor = Customer.class.getConstructor();
    Customer returnValue = new Customer();

    Set<ConstraintViolation<Customer>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue
    );
View Full Code Here


  @Test
  @SpecAssertion(section = "5.1.2", id = "k")
  public void testTwoViolations() throws Exception {
    Constructor<Customer> constructor = Customer.class.getConstructor( String.class );
    Customer returnValue = new Customer();

    Set<ConstraintViolation<Customer>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue
    );
View Full Code Here

  @Test
  @SpecAssertion(section = "5.1.2", id = "k")
  public void testTwoConstraintsOfSameType() throws Exception {
    Constructor<Customer> constructor = Customer.class.getConstructor( CharSequence.class );
    Customer returnValue = new Customer();

    Set<ConstraintViolation<Customer>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue
    );
View Full Code Here

  @Test
  @SpecAssertion(section = "5.1.2", id = "k")
  public void testNoViolations() throws Exception {
    Constructor<Customer> constructor = Customer.class.getConstructor();
    Customer returnValue = new Customer( "Bob" );

    Set<ConstraintViolation<Customer>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue
    );
View Full Code Here

  @Test
  @SpecAssertion(section = "5.1.2", id = "k")
  public void testValidationWithGroup() throws Exception {
    Constructor<Customer> constructor = Customer.class.getConstructor( long.class );
    Customer returnValue = new Customer();

    Set<ConstraintViolation<Customer>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue
    );
View Full Code Here

  @Test
  @SpecAssertion(section = "5.1.2", id = "k")
  public void testValidationWithSeveralGroups() throws Exception {
    Constructor<Customer> constructor = Customer.class.getConstructor( Date.class );
    Customer returnValue = new Customer();

    Set<ConstraintViolation<Customer>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue
    );
View Full Code Here

  @Test(expectedExceptions = IllegalArgumentException.class)
  @SpecAssertion(section = "5.1.2", id = "l")
  public void testNullPassedForConstructorCausesException() throws Exception {
    Constructor<Customer> constructor = null;
    Customer returnValue = new Customer();

    executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue
    );
View Full Code Here

  @Test(expectedExceptions = IllegalArgumentException.class)
  @SpecAssertion(section = "5.1.2", id = "l")
  public void testNullPassedForReturnValueCausesException() throws Exception {
    Constructor<Customer> constructor = Customer.class.getConstructor();
    Customer returnValue = null;

    executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue
    );
View Full Code Here

  @Test(expectedExceptions = IllegalArgumentException.class)
  @SpecAssertion(section = "5.1.2", id = "l")
  public void testNullPassedForGroupsCausesException() throws Exception {
    Constructor<Customer> constructor = Customer.class.getConstructor();
    Customer returnValue = new Customer();

    executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue,
        (Class<?>[]) null
View Full Code Here

  @Test(expectedExceptions = IllegalArgumentException.class)
  @SpecAssertion(section = "5.1.2", id = "l")
  public void testNullPassedAsSingleGroupCausesException() throws Exception {
    Constructor<Customer> constructor = Customer.class.getConstructor();
    Customer returnValue = new Customer();

    executableValidator.validateConstructorReturnValue(
        constructor,
        returnValue,
        (Class<?>) null
View Full Code Here

TOP

Related Classes of org.hibernate.beanvalidation.tck.tests.methodvalidation.model.Customer$Basic

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.