@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());
Punch[] punches = runnerData.getPunches();
assertEquals(2, punches.length);
assertEquals(31, punches[0].getCode());
assertEquals(TimeManager.safeParse("1:06:15"), punches[0].getTime());
assertEquals(32, punches[1].getCode());
assertEquals(TimeManager.safeParse("1:32:42"), punches[1].getTime());