Package org.richfaces.validator.ObjectValidator

Examples of org.richfaces.validator.ObjectValidator.ValidationResolver


  }
 
  public void testValidationResolver() throws Exception {
    ValidableBean bean = new ValidableBean();
    HibernateValidator beanValidator = new HibernateValidator();
    ValidationResolver validationResolver = beanValidator.createValidationResolver(facesContext, facesContext.getELContext().getELResolver(),null);
    Object list = validationResolver.getValue(elContext, bean, "list");
    assertNotNull(list);
    assertTrue(list instanceof List);
    validationResolver.setValue(elContext, list, new Integer(0), "");
    assertFalse(validationResolver.isValid());
    assertEquals(1, validationResolver.getValidationMessages().size());
  }
View Full Code Here


    assertEquals(1, validationResolver.getValidationMessages().size());
  }
  public void testValidationResolverMap() throws Exception {
    ValidableBean bean = new ValidableBean();
    HibernateValidator beanValidator = new HibernateValidator();
    ValidationResolver validationResolver = beanValidator.createValidationResolver(facesContext, facesContext.getELContext().getELResolver(),null);
    Object list = validationResolver.getValue(elContext, bean, "map");
    assertNotNull(list);
    assertTrue(list instanceof Map);
    validationResolver.setValue(elContext, list, new Integer(0), "");
    assertFalse(validationResolver.isValid());
    assertEquals(1, validationResolver.getValidationMessages().size());
  }
View Full Code Here

TOP

Related Classes of org.richfaces.validator.ObjectValidator.ValidationResolver

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.