Search in sources :

Example 6 with CsvMapperFactory

use of org.simpleflatmapper.csv.CsvMapperFactory in project SimpleFlatMapper by arnaudroger.

the class CsvMapperJoinTest method testDynamicProfessorCSharding.

@Test
public void testDynamicProfessorCSharding() throws IOException {
    final CsvMapperFactory mapperFactory = getCsvShardingMapperFactory();
    final List<ProfessorC> professors = mapperFactory.newMapper(ProfessorC.class).forEach(new StringReader(HEADER_DATA), new ListCollector<ProfessorC>()).getList();
    JoinTest.validateProfessors(professors);
}
Also used : ListCollector(org.simpleflatmapper.util.ListCollector) StringReader(java.io.StringReader) CsvMapperFactory(org.simpleflatmapper.csv.CsvMapperFactory) ProfessorC(org.simpleflatmapper.test.beans.ProfessorC) Test(org.junit.Test) JoinTest(org.simpleflatmapper.test.jdbc.JoinTest)

Aggregations

StringReader (java.io.StringReader)6 Test (org.junit.Test)6 CsvMapperFactory (org.simpleflatmapper.csv.CsvMapperFactory)6 JoinTest (org.simpleflatmapper.test.jdbc.JoinTest)5 ListCollector (org.simpleflatmapper.util.ListCollector)5 ProfessorC (org.simpleflatmapper.test.beans.ProfessorC)2 ProfessorGS (org.simpleflatmapper.test.beans.ProfessorGS)2 Date (java.util.Date)1 ProfessorField (org.simpleflatmapper.test.beans.ProfessorField)1 Tuple2 (org.simpleflatmapper.tuple.Tuple2)1