Examples of Cpf


Examples of br.com.objectos.way.base.br.Cpf

        { "793.388.741-41" }, { "79338874141" }, { "793.388.741/41" }, { "793,388,741/41" } };
  }

  @Test(dataProvider = "parser")
  public void parse_valid(String val) {
    Cpf res = Cpf.parseCPF(val);

    assertThat(res.toString(), equalTo("793.388.741-41"));
  }
View Full Code Here

Examples of br.com.objectos.way.base.br.Cpf

    assertTrue(false);
  }

  public void to_string() {
    Cpf res = Cpf.valueOf(79338874141l);

    assertThat(res.toString(), equalTo("793.388.741-41"));
  }
View Full Code Here

Examples of br.com.objectos.way.base.br.Cpf

    assertThat(res.toString(), equalTo("793.388.741-41"));
  }

  public void to_tring_zero_complete() {
    Cpf res = Cpf.valueOf(1132972892l);

    assertThat(res.toString(), equalTo("011.329.728-92"));
  }
View Full Code Here

Examples of br.com.objectos.way.base.br.Cpf

  public void deve_formatar_cpf() {
    int inicio = 4;
    int fim = 17;
    int tamanho = 14;
    Cpf valor = Cpf.valueOf(63455179762l);

    writer = new ColunaCadastroDaEmpresa(inicio, fim).set(valor);
    String res = writer.get();

    assertThat(res.length(), equalTo(tamanho));
View Full Code Here

Examples of br.com.objectos.way.base.br.Cpf

  @Test(expectedExceptions = { NullPointerException.class })
  public void caso_cadastro_seja_null_lancar_excecao() {
    int inicio = 0;
    int fim = 0;
    Cpf valor = null;

    writer = new ColunaCadastroDaEmpresa(inicio, fim).set(valor);
    writer.get();
  }
View Full Code Here

Examples of br.com.objectos.way.base.br.Cpf

    @Override
    public String toString() {
      StringBuilder s = new StringBuilder();

      Cpf cpf = (Cpf) cadastro;
      ColunaWriter<Integer> inscricaoCol = inscricao.set(cpf.getInscricao());
      s.append(inscricaoCol.get());

      s.append("0000");

      ColunaWriter<Integer> digitoCol = digito.set(cpf.getDigito());
      s.append(digitoCol.get());

      s.append("  ");

      ColunaWriter<String> avalistaCol = avalista.set(nome);
View Full Code Here

Examples of br.gov.component.demoiselle.common.pojo.helpers.CPF

public class CPFTest {
 
  @Test
  public void testCreateCPF()
  {
    CPF cpf = new CPF();
   
    assertNotNull(cpf);
   
    assertTrue(cpf instanceof CPF);
  }
View Full Code Here

Examples of br.gov.component.demoiselle.common.pojo.helpers.CPF

 
  @Test
  public void testConstructor()
  {
    // cpf gerado por programa externo (www.geradorcpf.com)   
    CPF cpf = new CPF("388.829.042-29");
   
    assertTrue(cpf.getCPFNumber().equals("38882904229"));
  }
View Full Code Here

Examples of br.gov.component.demoiselle.common.pojo.helpers.CPF

 
  @Test
  public void testDV()
  {
    // cpf gerado por programa externo (www.geradorcpf.com)   
    CPF cpf = new CPF("08274987560");
   
    assertTrue(cpf.getDV().equals("0"))
   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.