コード例 #1
0
  @Test
  public void read_attributes_names() {
    PojoReader reader = new SimplePojoReader(PersonTestData.getPersonList());
    String[] attributes = reader.getAttributes();

    String[] expectedAttributes = {"name", "age", "weight", "height"};

    assertArrayEquals(expectedAttributes, attributes);
  }
コード例 #2
0
  @Test
  public void read_values_from_pojo_list() throws Exception {
    List<Person> personList = PersonTestData.getPersonList();

    PojoReader reader = new SimplePojoReader(personList);
    Object[][] values = reader.getValues();

    Object[][] expectedValues = PersonTestData.getPersonListArray();

    assertArrayEquals(expectedValues, values);
  }