@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); }
@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); }