@Test public void test() throws IOException { final String basePath = System.getenv("DATA_DIR"); if (isNullOrEmpty(basePath)) { LOGGER.warn("To run this test, you need to set a system variable named DATA_DIR to the dir contains the data files."); return; } final Optional<Path> dataFile = Files .list(Paths.get(basePath)) .filter(path -> MISSIONS_TSV.equals(path.getFileName().toString())) .findFirst(); if (!dataFile.isPresent()) { LOGGER.warn("No {} found under {}, skipping ...", MISSIONS_TSV, basePath); return; } ReportDetails<List<Mission>> missionsReport = MissionsParser.getDefault().parse(dataFile.get()); assertNotNull(missionsReport); assertTrue(missionsReport.getError(), missionsReport.isOk()); final List<Mission> missions = missionsReport.getData(); assertNotNull(missions); assertFalse(missions.isEmpty()); LOGGER.info(JsonUtil.toPrettyJson(missions)); }
public static MissionsParser getDefault() { return INSTANCE; }
MissionsParser extends PlainTextDataFileParser<List<Mission>> { public static MissionsParser getDefault() { return INSTANCE; } }
MissionsParser extends PlainTextDataFileParser<List<Mission>> { public static MissionsParser getDefault() { return INSTANCE; } private  MissionsParser(); }
MissionsParser extends PlainTextDataFileParser<List<Mission>> { public static MissionsParser getDefault() { return INSTANCE; } private  MissionsParser(); static MissionsParser getDefault(); }
MissionsParser extends PlainTextDataFileParser<List<Mission>> { public static MissionsParser getDefault() { return INSTANCE; } private  MissionsParser(); static MissionsParser getDefault();  }