ExcelUtils excelUtils = new ExcelUtils(filename);
List<ColumnInfo> list = excelUtils.getColumnInfos();
// カラム数の確認
assertEquals(37, list.size());
// 最初のカラムの確認
ColumnInfo info;
info = list.get(0);
assertEquals("FOO", info.getTableName());
assertEquals("PK", info.getColumnName());
assertEquals("", info.getColumnComment());
assertEquals(MySqlDataType.LONG, info.getDataType());
assertTrue(info.isKey());
assertFalse(info.isNullable());
assertEquals(ColumnMatchingCondition.NONE, info.getColumnMatchingCondition());
assertEquals(NullValueCondition.NORMAL, info.getNullValueCondition());
// VARCHARのカラム(2番目)を確認
info = list.get(2 - 1); // カラム番号は1オリジンなので、-1する
assertEquals("FOO", info.getTableName());
assertEquals("DETAIL_GROUP_ID", info.getColumnName());
assertEquals("", info.getColumnComment());
assertEquals(MySqlDataType.VARCHAR, info.getDataType());
assertEquals(256, info.getCharacterMaximumLength());
assertFalse(info.isKey());
assertFalse(info.isNullable());
assertEquals(ColumnMatchingCondition.PARTIAL, info.getColumnMatchingCondition());
assertEquals(NullValueCondition.NULL_IS_NG, info.getNullValueCondition());
// DECIMALのカラム(29番目)を確認
info = list.get(29 - 1); // カラム番号は1オリジンなので、-1する
assertEquals("FOO", info.getTableName());
assertEquals("DEC_COL", info.getColumnName());
assertEquals("DEC_COL_C", info.getColumnComment());
assertEquals(MySqlDataType.DECIMAL, info.getDataType());
assertEquals(10, info.getNumericPrecision());
assertEquals(4, info.getNumericScale());
assertFalse(info.isKey());
assertTrue(info.isNullable());
assertEquals(ColumnMatchingCondition.EXACT, info.getColumnMatchingCondition());
assertEquals(NullValueCondition.NULL_IS_OK, info.getNullValueCondition());
}