Package com.thoughtworks.example.domain

Examples of com.thoughtworks.example.domain.Section


  @Test
  public void shouldCreateEntityBasedOnAnnotation() throws ExcelParsingException {
    List<Section> entityList = parser.createEntity(sheet, sheetName, Section.class);
    assertEquals(1, entityList.size());
    Section section = entityList.get(0);
    assertEquals("IV", section.getYear());
    assertEquals("B", section.getSection());
    assertEquals(3, section.getStudents().size());
   
    assertEquals(2001L, section.getStudents().get(0).getRoleNumber().longValue());
    assertEquals("Adam", section.getStudents().get(0).getName());
    SimpleDateFormat simpleDateFormat= new SimpleDateFormat("dd/MM/yyyy");
    assertEquals("01/01/2002", simpleDateFormat.format(section.getStudents().get(0).getDateOfBirth()));
    assertEquals("A", section.getStudents().get(0).getFatherName());
    assertEquals("D", section.getStudents().get(0).getMotherName());
    assertEquals("XYZ", section.getStudents().get(0).getAddress());
    assertNull(section.getStudents().get(0).getTotalScore());
  }
View Full Code Here

TOP

Related Classes of com.thoughtworks.example.domain.Section

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.