@Test
    public void canImportTheCorrectNumberOfRecords() throws Throwable {
        process(shakParser, shakDao, "data/sks/SHAKCOMPLETE.TXT");
        // FIXME: These record counts are only correct iff if duplicate keys are disregarted.
        // This is unfortunate. Keys are currently only considered based their SKSKode.
        // They should be a combination of type + kode + startdato based on the register doc.
        assertEquals(1017, jdbc.queryForInt("SELECT COUNT(*) FROM class_shak WHERE Organisationstype = 'Sygehus'"));
        assertEquals(18411, jdbc.queryForInt("SELECT COUNT(*) FROM class_shak WHERE Organisationstype = 'Afdeling'"));
        process(sksParser, sksDao, "data/sks/SKScomplete.txt");
        assertEquals(573, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'und'"));
        assertEquals(8990, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'pro'"));
        assertEquals(43857, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'dia'"));
        assertEquals(19980, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'opr'"));
        assertEquals(10461, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'atc'"));
    }
@Test
    public void canImportTheCorrectNumberOfRecords() throws Throwable {
        process(shakParser, shakDao, "data/sks/SHAKCOMPLETE.TXT");
       
       
       
        assertEquals(1017, jdbc.queryForInt("SELECT COUNT(*) FROM class_shak WHERE Organisationstype = 'Sygehus'"));
        assertEquals(18411, jdbc.queryForInt("SELECT COUNT(*) FROM class_shak WHERE Organisationstype = 'Afdeling'"));
        process(sksParser, sksDao, "data/sks/SKScomplete.txt");
        assertEquals(573, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'und'"));
        assertEquals(8990, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'pro'"));
        assertEquals(43857, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'dia'"));
        assertEquals(19980, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'opr'"));
        assertEquals(10461, jdbc.queryForInt("SELECT COUNT(*) FROM class_sks WHERE Type = 'atc'"));
    }
@test public void canimportthecorrectnumberofrecords() throws throwable { process(shakparser, shakdao, "data/sks/shakcomplete.txt"); assertequals(1017, jdbc.queryforint("select count(*) from class_shak where organisationstype = 'sygehus'")); assertequals(18411, jdbc.queryforint("select count(*) from class_shak where organisationstype = 'afdeling'")); process(sksparser, sksdao, "data/sks/skscomplete.txt"); assertequals(573, jdbc.queryforint("select count(*) from class_sks where type = 'und'")); assertequals(8990, jdbc.queryforint("select count(*) from class_sks where type = 'pro'")); assertequals(43857, jdbc.queryforint("select count(*) from class_sks where type = 'dia'")); assertequals(19980, jdbc.queryforint("select count(*) from class_sks where type = 'opr'")); assertequals(10461, jdbc.queryforint("select count(*) from class_sks where type = 'atc'")); }