Package net.geco.model.iocsv

Examples of net.geco.model.iocsv.CardDataIO


      e.printStackTrace();
    }

    try {
      reader.initialize(baseDir, CardDataIO.sourceFilename());
      new CardDataIO(factory(), reader, null, registry, version12).importData(); // MIGR12
    } catch (IOException e) {
      e.printStackTrace();
    }           

    try {
View Full Code Here


      e.printStackTrace();
    }

    try {
      writer.initialize(baseDir, CardDataIO.sourceFilename());
      new CardDataIO(factory(), null, writer, registry).exportData(registry.getRunnersData());
    } catch (IOException e) {
      e.printStackTrace();
    }

    try {
View Full Code Here

  }
 
  @Test
  public void testCardDataImport(){
    runnerFactory(66);
    CardDataIO cardDataIO = new CardDataIO(factory, null, null, registry);
    RunnerRaceData runnerData = cardDataIO.importTData(new String[]{
      "66", "--:--", "1:00:00", "1:00:15", "1:05:00", "2:10:05", "31", "1:06:15", "32", "1:32:42"       
//    Start id,Read time,Clear time,Check time,Start time,Finish time,Control,Split time, ...
    });
    cardDataIO.register(runnerData, registry);
    assertEquals(TimeManager.NO_TIME, runnerData.getReadtime());
    assertEquals(TimeManager.safeParse("1:00:00"), runnerData.getErasetime());
    assertEquals(TimeManager.safeParse("1:00:15"), runnerData.getControltime());
    assertEquals(TimeManager.safeParse("1:05:00"), runnerData.getStarttime());
    assertEquals(TimeManager.safeParse("2:10:05"), runnerData.getFinishtime());
View Full Code Here

    assertEquals(TimeManager.safeParse("1:32:42"), punches[1].getTime());
  }

  @Test
  public void testCardDataImportMigration12(){ // MIGR12
    CardDataIO cardDataIO = new CardDataIO(factory, null, null, registry, false);
    runnerFactory(67, "501aa");
    RunnerRaceData runnerData = cardDataIO.importTData(new String[]{
      "501aa", "1:00:00", "--:--", "1:00:15", "1:05:00", "2:10:05", "33", "1:06:15"       
    });
    cardDataIO.register(runnerData, registry);
    assertEquals(TimeManager.safeParse("1:00:00"), runnerData.getReadtime());
    assertEquals(TimeManager.NO_TIME, runnerData.getErasetime());
    assertEquals(TimeManager.safeParse("1:00:15"), runnerData.getControltime());
    assertEquals(TimeManager.safeParse("1:05:00"), runnerData.getStarttime());
    assertEquals(TimeManager.safeParse("2:10:05"), runnerData.getFinishtime());
View Full Code Here

  }
 
  @Test
  public void testCardDataRoundtrip(){
    runnerFactory(66);
    CardDataIO cardDataIO = new CardDataIO(factory, null, null, registry);
    String[] record = new String[]{
      "66", "--:--", "1:00:00", "1:00:15", "1:05:00", "2:10:05", "31", "1:06:15", "32", "1:32:42"       
    };
    RunnerRaceData runnerData = cardDataIO.importTData(record);
    cardDataIO.register(runnerData, registry);
    assertArrayEquals(record, cardDataIO.exportTData(runnerData));
  }
View Full Code Here

    try {
      reader.initialize(baseDir, RunnerIO.sourceFilename());
      new RunnerIO(factory, reader, null, registry, 0).importData();

      reader.initialize(baseDir, CardDataIO.sourceFilename());
      new CardDataIO(factory, reader, null, registry, false).importData();
    } catch (IOException e) {
      e.printStackTrace();
    }
   
    checkDNSRunner();
View Full Code Here

TOP

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

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.