Package br.com.objectos.comuns.cnab

Examples of br.com.objectos.comuns.cnab.ColunaLong


    int inicio = 2;
    int fim = 3;
    long valor = 4;
    int tamanho = 2;

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

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


    int inicio = 18;
    int fim = 21;
    long valor = 301;
    int tamanho = 4;

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

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

    int inicio = 24;
    int fim = 28;
    long valor = 1234;
    int tamanho = 5;

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

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

    int inicio = 29;
    int fim = 29;
    long valor = 9;
    int tamanho = 1;

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

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

    int inicio = 395;
    int fim = 400;
    long valor = 5;
    int tamanho = 6;

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

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

    int inicio = 0;
    int fim = 2;
    long valor = 3765;
    int tamanho = 3;

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

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

    int inicio = 0;
    int fim = 4;
    long valor = 9872;
    int tamanho = 5;

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

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

  public void deve_lancar_excecao_caso_valor_seja_menor_do_que_zero() {
    int inicio = 0;
    int fim = 4;
    long valor = -10000;

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

  public void deve_lancar_excecao_caso_inicio_seja_negativo() {
    int inicio = -1;
    int fim = 0;
    long valor = 81;

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

  public void deve_lancar_excecao_caso_fim_seja_menor_que_inicio() {
    int inicio = 10;
    int fim = 8;
    long valor = 34;

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

TOP

Related Classes of br.com.objectos.comuns.cnab.ColunaLong

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.