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

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


      @SpecAssertion(section = "5.2", id = "i")
  })
  public void testOneViolation() throws Exception {
    String methodName = "getAddress";

    Object object = new Customer();
    Method method = Customer.class.getMethod( methodName );
    Object returnValue = "B";

    Set<ConstraintViolation<Object>> violations = executableValidator.validateReturnValue(
        object,
View Full Code Here


  @Test
  @SpecAssertion(section = "5.1.2", id = "e")
  public void testTwoViolations() throws Exception {
    String methodName = "getFirstName";

    Object object = new Customer();
    Method method = Customer.class.getMethod( methodName, String.class );
    Object returnValue = "S";

    Set<ConstraintViolation<Object>> violations = executableValidator.validateReturnValue(
        object,
View Full Code Here

  @Test
  @SpecAssertion(section = "5.1.2", id = "e")
  public void testTwoConstraintsOfSameType() throws Exception {
    String methodName = "getLastName";

    Object object = new Customer();
    Method method = Customer.class.getMethod( methodName, CharSequence.class );
    Object returnValue = "S";

    Set<ConstraintViolation<Object>> violations = executableValidator.validateReturnValue(
        object,
View Full Code Here

  }

  @Test
  @SpecAssertion(section = "5.1.2", id = "e")
  public void testNoViolations() throws Exception {
    Object object = new Customer();
    Method method = Customer.class.getMethod( "getFirstName", String.class );
    Object returnValue = "aaa";

    Set<ConstraintViolation<Object>> violations = executableValidator.validateReturnValue(
        object,
View Full Code Here

  @Test
  @SpecAssertion(section = "5.1.2", id = "e")
  public void testValidationWithGroup() throws Exception {
    String methodName = "getLastName";

    Object object = new Customer();
    Method method = Customer.class.getMethod( methodName, long.class );
    Object returnValue = "S";

    Set<ConstraintViolation<Object>> violations = executableValidator.validateReturnValue(
        object,
View Full Code Here

  @Test
  @SpecAssertion(section = "5.1.2", id = "e")
  public void testValidationWithSeveralGroups() throws Exception {
    String methodName = "getAllData";

    Object object = new Customer();
    Method method = Customer.class.getMethod( methodName, Date.class );
    Object returnValue = "S";

    Set<ConstraintViolation<Object>> violations = executableValidator.validateReturnValue(
        object,
View Full Code Here

  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  @SpecAssertion(section = "5.1.2", id = "f")
  public void testNullPassedForMethodCausesException() throws Exception {
    Object object = new Customer();
    Method method = null;
    Object returnValue = null;

    executableValidator.validateReturnValue(
        object,
View Full Code Here

  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  @SpecAssertion(section = "5.1.2", id = "f")
  public void testNullPassedForGroupsCausesException() throws Exception {
    Object object = new Customer();
    Method method = Customer.class.getMethod( "getAddress" );
    Object returnValue = null;

    executableValidator.validateReturnValue(
        object,
View Full Code Here

  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  @SpecAssertion(section = "5.1.2", id = "f")
  public void testNullPassedAsSingleGroupCausesException() throws Exception {
    Object object = new Customer();
    Method method = Customer.class.getMethod( "getAddress" );
    Object returnValue = null;

    executableValidator.validateReturnValue(
        object,
View Full Code Here

TOP

Related Classes of org.hibernate.beanvalidation.tck.tests.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.