}
public void testDriverTypes() throws Exception {
DriverManager dm = ds.getDriverManager();
FileDriver fd = (FileDriver) dm.getDriver("csv string");
DBDriver dd = (DBDriver) dm.getDriver("GDBMS HSQLDB driver");
String[] types = fd.getAvailableTypes();
String[] params = fd.getParameters(types[0]);
assertTrue(types.length == 1);
assertTrue(types[0].equals("STRING"));
assertTrue(params.length == 0);
types = dd.getAvailableTypes();
params = dd.getParameters("CHAR");
assertTrue(types.length > 0);
for (int i = 0; i < types.length; i++) {
if (types[i].equals("CHAR")) {
params = dd.getParameters(types[i]);
assertTrue(params[0].equals("LENGTH"));
assertTrue(params.length == 1);
} else if (types[i].equals("DECIMAL")) {
params = dd.getParameters(types[i]);
assertTrue(params[0].equals("PRECISION"));
assertTrue(params[1].equals("SCALE"));
assertTrue(params.length == 2);
}
}