Package net.geco.model.iocsv

Examples of net.geco.model.iocsv.RunnerIO.exportTData()


  private void appendCsvHeat(Heat heat, CsvWriter writer) throws IOException {
    RunnerIO runnerIO = new RunnerIO(null, null, writer, null, stage().getZeroHour());
    Course heatCourse = factory().createCourse();
    heatCourse.setName(heat.getName());
    for (Runner runner : heat.getQualifiedRunners()) {
      writer.writeRecord(runnerIO.exportTData(cloneRunnerForHeat(runner, heatCourse)));
    }
  }
  private Runner cloneRunnerForHeat(Runner runner, Course heatCourse) {
    Runner newRunner = factory().createRunner();
    newRunner.setStartId(newStartId());
View Full Code Here


    runner.setLastname("Doe");
    runner.setNC(true);
    runner.setRentedEcard(true);
    runner.setStartId(100);
    runner.setRegisteredStarttime(new Date(3600000));
    String[] data = runnerIO.exportTData(runner);
   
    assertArrayEquals(
        new String[]{"100", "203a", "John", "Doe", "Cl", "Course", "true", "H60", "1:00:00", "", "", "true", "50000"},
        data);
  }
View Full Code Here

  public void testRunnerRoundtrip(){
    RunnerIO runnerIO = new RunnerIO(factory, null, null, registry, 0);
    String[] record = new String[]{
      "100", "203a", "John", "Doe", "Cl", "Course", "true", "H60", "1:00:00", "", "", "true", "50000"
    };
    assertArrayEquals(record, runnerIO.exportTData(runnerIO.importTData(record)));
  }
 
  private Runner runnerFactory(Integer startId){
    return runnerFactory(startId, "");
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.