1 package junitparams.usage.person_example; 2 3 import java.io.*; 4 import java.util.*; 5 6 import junitparams.internal.*; 7 import junitparams.mappers.*; 8 9 public class PersonMapper extends CsvWithHeaderMapper { 10 @Override 11 public Object[] map(Reader reader) { 12 Object[] map = super.map(reader); 13 List<Object[]> result = new LinkedList<Object[]>(); 14 for (Object lineObj : map) { 15 String line = (String) lineObj; 16 result.add(new Object[] { line.substring(2), Integer.parseInt(line.substring(0, 1)) }); 17 } 18 return result.toArray(); 19 } 20 21 }