is = new FileInputStream(xmlFileName);
}
String charSet = System.getProperty("charSet", null);
SqlInfo record = parser.parse(is, charSet);
SqlDescription description = record.getDescription();
assertNotNull("the description shall not be null", description);
assertNotNull("the identity shall not be null", description.getIdentity());
assertNotNull("the command shall not be null", description.getCommand());
assertEquals("the identity content is wrong", "EDDI", description.getIdentity());
assertEquals("the command content is wrong", "INSERT", description.getCommand());
// test the column descriptions
SqlColumn[] colDescriptions = description.getColumns();
assertEquals("the number of column descriptions is wrong", 4, colDescriptions.length);
String[] names = new String[] { "DATUM", "CPU", "COL1", "ICAO_ID"};
for (int i=0; i < colDescriptions.length; i++) {
log.info("test column description #" + i + " names: '" + names[i] + "' and '" + colDescriptions[i].getColName() + "'");
assertEquals("the name of the column description #" + i + " is wrong", names[i], colDescriptions[i].getColName());