Examples of Banco


Examples of br.com.caelum.stella.boleto.Banco

 
  private Beneficiario beneficiario = Beneficiario.novoBeneficiario();

  @Test
  public void deveRetornarOBancoBaseadoNoNumero() throws Exception {
    Banco brasil = Bancos.getPorNumero("001");
    Banco itau = Bancos.getPorNumero("341");

    Assert.assertThat(brasil, Matchers.instanceOf(BancoDoBrasil.class));
    Assert.assertThat(itau, Matchers.instanceOf(Itau.class));
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.Banco

    Bancos.getPorNumero("9999");
  }
 
  @Test
  public void obterAgenciaECodigoBeneficiarioFormatadoSemDV() throws Exception {
    Banco banco = new BancoDoBrasil();
   
    beneficiario.comAgencia("1234").comDigitoAgencia(null)
      .comCodigoBeneficiario("12345678").comDigitoCodigoBeneficiario(null);
   
    assertThat(banco.getAgenciaECodigoBeneficiario(beneficiario), is("1234/12345678"));
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.Banco

    assertThat(banco.getAgenciaECodigoBeneficiario(beneficiario), is("1234/12345678"));
  }
 
  @Test
  public void obterAgenciaECodigoBeneficiarioFormatado() throws Exception {
    Banco banco = new BancoDoBrasil();
   
    beneficiario.comAgencia("1234").comDigitoAgencia("3")
      .comCodigoBeneficiario("12345678").comDigitoCodigoBeneficiario("9");
   
    assertThat(banco.getAgenciaECodigoBeneficiario(beneficiario), is("1234-3/12345678-9"));
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.Banco

public class LinhaDigitavelGenerator {
    private final DVGenerator dvGenerator = new DVGenerator();

    public String geraLinhaDigitavelPara(Boleto boleto) {
        Banco banco = boleto.getBanco();

        String codigoDeBarras = banco.geraCodigoDeBarrasPara(boleto);

        StringBuilder bloco1 = new StringBuilder();
        bloco1.append(banco.getNumeroFormatado());
        bloco1.append(String.valueOf(boleto.getCodEspecieMoeda()));
        bloco1.append(codigoDeBarras.substring(19, 24));
        bloco1.append(this.dvGenerator.geraDVMod10(bloco1.toString()));

        StringBuilder bloco2 = new StringBuilder();
View Full Code Here

Examples of br.com.caelum.stella.boleto.Banco

public class LinhaDigitavelGenerator {
    private final GeradorDeDigitoDeBoleto dvGenerator = new GeradorDeDigitoDeBoleto();

    public String geraLinhaDigitavelPara(Boleto boleto) {
        Banco banco = boleto.getBanco();

        String codigoDeBarras = banco.geraCodigoDeBarrasPara(boleto);

        StringBuilder bloco1 = new StringBuilder();
        bloco1.append(banco.getNumeroFormatado());
        bloco1.append(String.valueOf(boleto.getCodigoEspecieMoeda()));
        bloco1.append(codigoDeBarras.substring(19, 24));
        bloco1.append(this.dvGenerator.geraDigitoMod10(bloco1.toString()));

        StringBuilder bloco2 = new StringBuilder();
View Full Code Here

Examples of br.com.caelum.stella.boleto.Banco

    Sacado sacado = Sacado.newSacado().withNome("Fulano da Silva").withCpf(
        "111.222.333-12").withEndereco("Av dos testes, 111 apto 333")
        .withBairro("Bairro Teste").withCep("01234-111").withCidade(
            "São Paulo").withUf("SP");

    Banco banco = new BancoDoBrasil();

    Boleto boleto = Boleto.newBoleto().withBanco(banco).withDatas(datas)
        .withDescricoes("descricao 1", "descricao 2", "descricao 3",
            "descricao 4", "descricao 5").withEmissor(emissor)
        .withSacado(sacado).withValorBoleto("200.00").withNoDocumento(
View Full Code Here

Examples of br.com.caelum.stella.boleto.Banco

            .withBairro("Bairro Teste")
            .withCep("01234-111")
            .withCidade("São Paulo")
            .withUf("SP");

        Banco banco = new Bradesco();

        Boleto boleto = Boleto.newBoleto()
            .withBanco(banco)
            .withDatas(datas)
            .withDescricoes("descricao 1", "descricao 2", "descricao 3",
View Full Code Here

Examples of br.com.caelum.stella.boleto.Banco

      .withBairro("Bairro Teste")
      .withCep("01234-111")
      .withCidade("São Paulo")
      .withUf("SP");

    Banco banco = new BancoDoBrasil();

    Boleto boleto = Boleto.newBoleto()
        .withBanco(banco)
        .withDatas(datas)
        .withDescricoes("descricao 1", "descricao 2", "descricao 3",
View Full Code Here

Examples of br.com.caelum.stella.boleto.Banco

            .withBairro("Bairro Teste")
            .withCep("01234-111")
            .withCidade("São Paulo")
            .withUf("SP");

        Banco banco = new BancoDoBrasil();

        Boleto boleto = Boleto.newBoleto()
            .withBanco(banco)
            .withDatas(datas)
            .withDescricoes("descricao 1", "descricao 2", "descricao 3",
View Full Code Here

Examples of br.com.caelum.stella.boleto.Banco

            .withBairro("Bairro Teste")
            .withCep("01234-111")
            .withCidade("São Paulo")
            .withUf("SP");

        Banco banco = new Bradesco();

        Boleto boleto = Boleto.newBoleto()
            .withBanco(banco)
            .withDatas(datas)
            .withDescricoes("descricao 1", "descricao 2", "descricao 3",
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.