Package net.geco.model.iocsv

Examples of net.geco.model.iocsv.ResultDataIO


      e.printStackTrace();
    }           

    try {
      reader.initialize(baseDir, ResultDataIO.sourceFilename());
      new ResultDataIO(factory(), reader, null, registry, version12).importData();
    } catch (IOException e) {
      e.printStackTrace();
    }
   
    if( GecoResources.exists(baseDir + GecoResources.sep + HeatSetIO.sourceFilename()) ) {
View Full Code Here


      e.printStackTrace();
    }

    try {
      writer.initialize(baseDir, ResultDataIO.sourceFilename());
      new ResultDataIO(factory(), null, writer, registry).exportData(registry.getRunnersData());
    } catch (IOException e) {
      e.printStackTrace();
    }
   
    if( registry.getHeatSets().size()>0 ) {
View Full Code Here

  }

  @Test
  public void testResultDataImport(){
    testCardDataImport();
    ResultDataIO resultDataIO = new ResultDataIO(factory, null, null, registry);
    RunnerRaceData raceData = resultDataIO.importTData(new String[]{
      "66", "NOS", "0:59:25"
      // start id, status, racetime
    });
    assertEquals(Status.NOS, raceData.getStatus());
    assertEquals(TimeManager.safeParse("0:59:25").getTime(), raceData.getResult().getRacetime());
View Full Code Here

  }

  @Test
  public void testResultDataImportMigration12(){ // MIGR12
    testCardDataImportMigration12();
    ResultDataIO resultDataIO = new ResultDataIO(factory, null, null, registry, false);
    RunnerRaceData raceData = resultDataIO.importTData(new String[]{
      "501aa", "NOS", "0:59:25"
    });
    assertEquals(Status.NOS, raceData.getStatus());
    assertEquals(TimeManager.safeParse("0:59:25").getTime(), raceData.getResult().getRacetime());
  }
View Full Code Here

  }
 
  @Test
  public void testResultDataRoundtrip(){
    testCardDataImport();
    ResultDataIO resultDataIO = new ResultDataIO(factory, null, null, registry);
    String[] record = new String[]{"66", "NOS", "0:59:25"};
    assertArrayEquals(record, resultDataIO.exportTData(resultDataIO.importTData(record)));

  }
View Full Code Here

TOP

Related Classes of net.geco.model.iocsv.ResultDataIO

Copyright © 2018 www.massapicom. 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.