Package br.com.objectos.way.base.br

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


*/
@Test
public class TesteDeCep {

  public void value_of_int() {
    Cep res = Cep.valueOf(4614013);

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


    assertThat(res.toString(), equalTo("04614-013"));
  }

  public void value_of_string() {
    Cep res = Cep.valueOf("04614-013");

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

    assertThat(res.toString(), equalTo("04614-013"));
  }

  public void value_of_string_sem_hifen() {
    Cep res = Cep.valueOf("04614013");

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

    assertThat(res.toString(), equalTo("04614-013"));
  }

  public void to_string() {
    Cep res = Cep.valueOf(4614013);

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

    CnabKey<BradescoLoteRemessa, String> col = loteRemessa().primeiraMensagem();
    writeAndAssert(col, valor);
  }

  public void cep() {
    Cep valor = Cep.valueOf("04614-013");
    CnabKey<BradescoLoteRemessa, Cep> col = loteRemessa().cep();
    writeAndAssert(col, valor);
  }
View Full Code Here

  public void deve_formatar_cep() {
    int inicio = 0;
    int fim = 7;
    int tamanho = 8;
    Cep valor = Cep.valueOf(20260160);

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

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

  @Test(expectedExceptions = { ExcecaoDeCepInvalido.class })
  public void deve_lancar_excecao_ao_receber_cep_invalido() {
    int inicio = 0;
    int fim = 0;
    Cep valor = Cep.valueOf("INVALIDO");

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

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

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

    writeAndAssert(col, valor);
  }

  public void cep() {
    CnabKey<ItauLoteRemessa, Cep> col = loteRemessa().sacadoCep();
    Cep valor = Cep.valueOf("10124-500");
    writeAndAssert(col, valor);
  }
View Full Code Here

    return format(inicio, fim, valor);
  }

  @Override
  public ColunaWriter<Cep> set(Object valor) {
    Cep val = Cep.class.cast(valor);
    return new ColunaCep(inicio, fim, val);
  }
View Full Code Here

TOP

Related Classes of br.com.objectos.way.base.br.Cep

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.