Package br.com.caelum.stella.bean.validation.logic

Examples of br.com.caelum.stella.bean.validation.logic.StellaCPFValidator


  }

  @Before
  public void createValidator() throws Exception {
    CPF cpfAnnotation = ObjectWithCPF.class.getDeclaredField("cpf").getAnnotation(CPF.class);
    validator = new StellaCPFValidator();
    validator.initialize(cpfAnnotation);
  }
View Full Code Here


  }
 
  @Test
  public void shouldValidateCPFWithRepeatedDigitsIfConfigured() throws Exception{
    CPF cpfAnnotation = ObjectWithCPFConfigured.class.getDeclaredField("cpf").getAnnotation(CPF.class);
    StellaCPFValidator anotherValidator = new StellaCPFValidator();
    anotherValidator.initialize(cpfAnnotation);
   
    boolean valid = anotherValidator.isValid("00000000000", context);
    assertTrue(valid);
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.stella.bean.validation.logic.StellaCPFValidator

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.