Package br.com.six2six.fixturefactory.function.impl

Examples of br.com.six2six.fixturefactory.function.impl.CnpjFunction


public class CnpjFunctionTest {

  @Test
  public void randomCnpj() {
    String value = new CnpjFunction().generateValue();
    assertNotNull("Generated CNPJ can not be null", value);
    assertTrue("Invalid match for CNPJ", Pattern.matches("\\d{14}", value));
  }
View Full Code Here


    assertTrue("Invalid match for CNPJ", Pattern.matches("\\d{14}", value));
  }

  @Test
  public void randomFormattedCpf() {
    String value = new CnpjFunction(true).generateValue();
    assertNotNull("Generated formatted CNPJ can not be null", value);
    assertTrue("Invalid match for CNPJ", Pattern.matches("\\d{2}.\\d{3}.\\d{3}/\\d{4}-\\d{2}", value));
  }
View Full Code Here

TOP

Related Classes of br.com.six2six.fixturefactory.function.impl.CnpjFunction

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.