Package br.com.bfmapper.model

Examples of br.com.bfmapper.model.AlunoCanonico


  }
 
  @Test
  public void converterWithTransformerValues() {
    Aluno aluno = new Aluno(1L, "Aline Alves", "20", "07111989", "REGULAR");
    AlunoCanonico alunoCanonico = new Mapping().apply(aluno).to(AlunoCanonico.class);

    assertNotNull("Objeto aluno não poder ser null", alunoCanonico);
    assertNotNull("Propriedade id não poder ser null", alunoCanonico.getId());
    assertNotNull("Propriedade nome não poder ser null", alunoCanonico.getNome());
    assertNotNull("Propriedade idade não poder ser null", alunoCanonico.getIdade());   
    assertNotNull("Propriedade dataAniversario não poder ser null", alunoCanonico.getDataAniversario());
    assertNotNull("Propriedade tipoAluno não poder ser null", alunoCanonico.getTipoAluno());
    assertEquals("Propriedade sexo deve receber o vsalor default 'F'", alunoCanonico.getSexo(), "F");
  }
View Full Code Here


  @Test
  public void converterListSimpleType() {
    Aluno aluno = new Aluno(1L, "Aline Alves", "20", "07111989", "REGULAR");
    aluno.setNotas(Arrays.asList("0.1", "0.2", "10.0"));
   
    AlunoCanonico alunoCanonico = new Mapping().apply(aluno).to(AlunoCanonico.class);

    assertNotNull("Propriedade notas não poder ser null", alunoCanonico.getNotas());
    assertNotNull("Propriedade notas não poder ser vazia", !alunoCanonico.getNotas().isEmpty());
  }
View Full Code Here

TOP

Related Classes of br.com.bfmapper.model.AlunoCanonico

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.