use of org.neo4j.csv.reader.CharSeeker in project neo4j by neo4j.
the class DataFactoriesTest method shouldParseDefaultRelationshipFileHeaderCorrectly.
@Test
public void shouldParseDefaultRelationshipFileHeaderCorrectly() throws Exception {
// GIVEN
CharSeeker seeker = seeker(":START_ID\t:END_ID\ttype:TYPE\tdate:long\tmore:long[]");
IdType idType = IdType.ACTUAL;
Extractors extractors = new Extractors('\t');
// WHEN
Header header = DataFactories.defaultFormatRelationshipFileHeader().create(seeker, TABS, idType);
// THEN
assertArrayEquals(array(entry(null, Type.START_ID, idType.extractor(extractors)), entry(null, Type.END_ID, idType.extractor(extractors)), entry("type", Type.TYPE, extractors.string()), entry("date", Type.PROPERTY, extractors.long_()), entry("more", Type.PROPERTY, extractors.longArray())), header.entries());
seeker.close();
}
Aggregations