Package org.hibernate.validator.test.internal.engine.methodvalidation.model

Examples of org.hibernate.validator.test.internal.engine.methodvalidation.model.Customer


    return 9;
  }

  @Override
  public Customer cascadingReturnValue() {
    return new Customer( null );
  }
View Full Code Here


    return new Customer( null );
  }

  @Override
  public List<Customer> cascadingIterableReturnValue() {
    return Arrays.asList( null, new Customer( null ) );
  }
View Full Code Here

  }

  @Override
  public Map<String, Customer> cascadingMapReturnValue() {
    Map<String, Customer> theValue = newHashMap();
    theValue.put( "Bob", new Customer( null ) );
    return theValue;
  }
View Full Code Here

    return theValue;
  }

  @Override
  public Customer[] cascadingArrayReturnValue() {
    return new Customer[] { null, new Customer( null ) };
  }
View Full Code Here

    return new Customer[] { null, new Customer( null ) };
  }

  @Override
  public Customer overriddenMethodWithCascadingReturnValue() {
    return new Customer( null );
  }
View Full Code Here

    }
  }

  @Test
  public void methodValidationWithCascadingParameter() {
    Customer customer = new Customer( null, null );
    try {
      customerRepository.persistCustomer( customer );
      fail( "Expected ConstraintViolationException wasn't thrown." );
    }
    catch ( ConstraintViolationException e ) {
View Full Code Here

  }

  @Test
  public void methodValidationWithCascadingParameterAndCascadingConstraint() {
    Address address = new Address( null );
    Customer customer = new Customer( "Bob", address );

    try {
      customerRepository.persistCustomer( customer );
      fail( "Expected ConstraintViolationException wasn't thrown." );
    }
View Full Code Here

  }

  @Test
  public void cascadingMapParameter() {
    Map<String, Customer> customers = newHashMap();
    Customer bob = new Customer( null );
    customers.put( "Bob", bob );

    try {
      customerRepository.cascadingMapParameter( customers );
      fail( "Expected ConstraintViolationException wasn't thrown." );
View Full Code Here

    }
  }

  @Test
  public void cascadingIterableParameter() {
    Customer customer = new Customer( null );
    List<Customer> customers = Arrays.asList( null, customer );

    try {
      customerRepository.cascadingIterableParameter( customers );
      fail( "Expected ConstraintViolationException wasn't thrown." );
View Full Code Here

    }
  }

  @Test
  public void cascadingArrayParameter() {
    Customer customer = new Customer( null );

    try {
      customerRepository.cascadingArrayParameter( null, customer );
      fail( "Expected ConstraintViolationException wasn't thrown." );
    }
View Full Code Here

TOP

Related Classes of org.hibernate.validator.test.internal.engine.methodvalidation.model.Customer

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.