// 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.
@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'"));
    }
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'"));
@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");
// 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'"));
}