use of com.Ostermiller.util.LabeledCSVParser in project eol-globi-data by jhpoelen.
the class LengthRangeParserImplTest method parseLengthMalformed.
@Test(expected = StudyImporterException.class)
public void parseLengthMalformed() throws IOException, StudyImporterException {
LengthRangeParserImpl parser = new LengthRangeParserImpl("johnny");
LabeledCSVParser csvParser = new TestParserFactory("johnny\nAINTRIGHT\n324\n").createParser("aStudy", "UTF-8");
csvParser.getLine();
parser.parseLengthInMm(csvParser);
}
use of com.Ostermiller.util.LabeledCSVParser in project eol-globi-data by jhpoelen.
the class StudyImporterForRaymondTest method importPartialStudy.
@Test
public void importPartialStudy() throws IOException, StudyImporterException {
StudyImporterForRaymond importer = new StudyImporterForRaymond(new ParserFactoryLocal(), nodeFactory);
LabeledCSVParser dietParser = CSVTSVUtil.createLabeledCSVParser(new StringReader(firstFewLinesOfDiet()));
LabeledCSVParser sourcesParser = CSVTSVUtil.createLabeledCSVParser(new StringReader(firstFewLinesOfSourcesAlteredToFitDietDataSample()));
importer.importData(sourcesParser, dietParser);
assertThatAllStudiesHaveAtLeastOneInteraction();
}
Aggregations