ExcelUtils excelUtils = new ExcelUtils(filename);
// getLongOptionのテスト
LongOption longOption = new LongOption();
longOption.modify(0);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_0, TYPES.BIGINT, longOption);
longOption.modify(1);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_1, TYPES.BIGINT, longOption);
longOption.modify(-1);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MINUS1, TYPES.BIGINT, longOption);
longOption.modify(ExcelUtils.EXCEL_MAX_LONG);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MAX, TYPES.BIGINT, longOption);
longOption.modify(ExcelUtils.EXCEL_MIN_LONG);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MIN, TYPES.BIGINT, longOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DECIMAL, TYPES.BIGINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_OVER_MAX, TYPES.BIGINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_UNDER_MIN, TYPES.BIGINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.BIGINT, new NumberFormatException("表現可能な範囲外の数値"));
longOption.modify(0);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.BIGINT, longOption);
longOption.modify(1);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.BIGINT, longOption);
longOption.modify(-1);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.BIGINT, longOption);
longOption.modify(Long.MAX_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MAX, TYPES.BIGINT, longOption);
longOption.modify(Long.MIN_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MIN, TYPES.BIGINT, longOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DECIMAL, TYPES.BIGINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_OVER_MAX, TYPES.BIGINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_UNDER_MIN, TYPES.BIGINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_BIG_VALUE, TYPES.BIGINT, new CellTypeMismatchException("数値"));
longOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.BLANK, TYPES.BIGINT, longOption);
longOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.NULL_STRING, TYPES.BIGINT, new CellTypeMismatchException("数値"));
longOption.modify(1);
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_TRUE, TYPES.BIGINT, longOption);
longOption.modify(0);
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_FALSE, TYPES.BIGINT, longOption);
longOption.modify(40179);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATE, TYPES.BIGINT, longOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT1, TYPES.BIGINT, longOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT2, TYPES.BIGINT, longOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT1, TYPES.BIGINT, longOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT2, TYPES.BIGINT, longOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATE, TYPES.BIGINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATETIME, TYPES.BIGINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT1, TYPES.BIGINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT2, TYPES.BIGINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT1, TYPES.BIGINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT2, TYPES.BIGINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATETIME, TYPES.BIGINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.ERROR, TYPES.BIGINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.FORMULA, TYPES.BIGINT, new CellTypeMismatchException("数値"));
// getIntOptionのテスト
IntOption intOption = new IntOption();
intOption.modify(0);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_0, TYPES.INT, intOption);
intOption.modify(1);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_1, TYPES.INT, intOption);
intOption.modify(-1);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MINUS1, TYPES.INT, intOption);
intOption.modify(Integer.MAX_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MAX, TYPES.INT, intOption);
intOption.modify(Integer.MIN_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MIN, TYPES.INT, intOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DECIMAL, TYPES.INT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_OVER_MAX, TYPES.INT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_UNDER_MIN, TYPES.INT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.INT, new NumberFormatException("表現可能な範囲外の数値"));
intOption.modify(0);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.INT, intOption);
intOption.modify(1);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.INT, intOption);
intOption.modify(-1);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.INT, intOption);
intOption.modify(Integer.MAX_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MAX, TYPES.INT, intOption);
intOption.modify(Integer.MIN_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MIN, TYPES.INT, intOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DECIMAL, TYPES.INT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_OVER_MAX, TYPES.INT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_UNDER_MIN, TYPES.INT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_BIG_VALUE, TYPES.INT, new CellTypeMismatchException("数値"));
intOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.BLANK, TYPES.INT, intOption);
longOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.NULL_STRING, TYPES.INT, new CellTypeMismatchException("数値"));
intOption.modify(1);
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_TRUE, TYPES.INT, intOption);
intOption.modify(0);
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_FALSE, TYPES.INT, intOption);
intOption.modify(40179);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATE, TYPES.INT, intOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT1, TYPES.INT, intOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT2, TYPES.INT, intOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT1, TYPES.INT, intOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT2, TYPES.INT, intOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATE, TYPES.INT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATETIME, TYPES.INT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT1, TYPES.INT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT2, TYPES.INT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT1, TYPES.INT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT2, TYPES.INT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATETIME, TYPES.INT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.ERROR, TYPES.INT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.FORMULA, TYPES.INT, new CellTypeMismatchException("数値"));
// getShortOptionのテスト
ShortOption shortOption = new ShortOption();
shortOption.modify((short) 0);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_0, TYPES.SMALLINT, shortOption);
shortOption.modify((short) 1);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_1, TYPES.SMALLINT, shortOption);
shortOption.modify((short) -1);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MINUS1, TYPES.SMALLINT, shortOption);
shortOption.modify(Short.MAX_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MAX, TYPES.SMALLINT, shortOption);
shortOption.modify(Short.MIN_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MIN, TYPES.SMALLINT, shortOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DECIMAL, TYPES.SMALLINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_OVER_MAX, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_UNDER_MIN, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
shortOption.modify((short)0);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.SMALLINT, shortOption);
shortOption.modify((short)1);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.SMALLINT, shortOption);
shortOption.modify((short)-1);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.SMALLINT, shortOption);
shortOption.modify(Short.MAX_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MAX, TYPES.SMALLINT, shortOption);
shortOption.modify(Short.MIN_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MIN, TYPES.SMALLINT, shortOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DECIMAL, TYPES.SMALLINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_OVER_MAX, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_UNDER_MIN, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_BIG_VALUE, TYPES.SMALLINT, new CellTypeMismatchException("数値"));
shortOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.BLANK, TYPES.SMALLINT, shortOption);
longOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.NULL_STRING, TYPES.SMALLINT, new CellTypeMismatchException("数値"));
shortOption.modify((short)1);
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_TRUE, TYPES.SMALLINT, shortOption);
shortOption.modify((short)0);
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_FALSE, TYPES.SMALLINT, shortOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATE, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT1, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT2, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT1, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT2, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATE, TYPES.SMALLINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATETIME, TYPES.SMALLINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT1, TYPES.SMALLINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT2, TYPES.SMALLINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT1, TYPES.SMALLINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT2, TYPES.SMALLINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATETIME, TYPES.SMALLINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.ERROR, TYPES.SMALLINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.FORMULA, TYPES.SMALLINT, new CellTypeMismatchException("数値"));
// getByteOptionのテスト
ByteOption byteOption = new ByteOption();
byteOption.modify((byte) 0);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_0, TYPES.TINYINT, byteOption);
byteOption.modify((byte) 1);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_1, TYPES.TINYINT, byteOption);
byteOption.modify((byte) -1);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MINUS1, TYPES.TINYINT, byteOption);
byteOption.modify(Byte.MAX_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MAX, TYPES.TINYINT, byteOption);
byteOption.modify(Byte.MIN_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MIN, TYPES.TINYINT, byteOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DECIMAL, TYPES.TINYINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_OVER_MAX, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_UNDER_MIN, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
byteOption.modify((byte)0);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.TINYINT, byteOption);
byteOption.modify((byte)1);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.TINYINT, byteOption);
byteOption.modify((byte)-1);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.TINYINT, byteOption);
byteOption.modify(Byte.MAX_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MAX, TYPES.TINYINT, byteOption);
byteOption.modify(Byte.MIN_VALUE);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MIN, TYPES.TINYINT, byteOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DECIMAL, TYPES.TINYINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_OVER_MAX, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_UNDER_MIN, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_BIG_VALUE, TYPES.TINYINT, new CellTypeMismatchException("数値"));
byteOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.BLANK, TYPES.TINYINT, byteOption);
longOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.NULL_STRING, TYPES.TINYINT, new CellTypeMismatchException("数値"));
byteOption.modify((byte)1);
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_TRUE, TYPES.TINYINT, byteOption);
byteOption.modify((byte)0);
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_FALSE, TYPES.TINYINT, byteOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATE, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT1, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT2, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT1, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT2, TYPES.TINYINT, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATE, TYPES.TINYINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATETIME, TYPES.TINYINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT1, TYPES.TINYINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT2, TYPES.TINYINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT1, TYPES.TINYINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT2, TYPES.TINYINT, new NumberFormatException("小数部を持つ数値を整数型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATETIME, TYPES.TINYINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.ERROR, TYPES.TINYINT, new CellTypeMismatchException("数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.FORMULA, TYPES.TINYINT, new CellTypeMismatchException("数値"));
// getStringOptionのテスト
StringOption stringOption = new StringOption();
stringOption.modify("0");
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_0, TYPES.CHAR, stringOption);
stringOption.modify("1");
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_1, TYPES.CHAR, stringOption);
stringOption.modify("-1");
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MINUS1, TYPES.CHAR, stringOption);
stringOption.modify("6.54321");
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DECIMAL, TYPES.CHAR, stringOption);
stringOption.modify("9.2233720368547697E18");
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_OVER_MAX, TYPES.CHAR, stringOption);
stringOption.modify("-9.2233720368547697E18");
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_UNDER_MIN, TYPES.CHAR, stringOption);
stringOption.modify("1.23456789012345E19");
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.CHAR, stringOption);
stringOption.modify("0");
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.CHAR, stringOption);
stringOption.modify("1");
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.CHAR, stringOption);
stringOption.modify("-1");
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.CHAR, stringOption);
stringOption.modify("6.54321");
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DECIMAL, TYPES.CHAR, stringOption);
stringOption.modify("9223372036854775808");
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_OVER_MAX, TYPES.CHAR, stringOption);
stringOption.modify("-9223372036854775809");
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_UNDER_MIN, TYPES.CHAR, stringOption);
stringOption.modify("12345678901234567890");
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_BIG_VALUE, TYPES.CHAR, stringOption);
stringOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.BLANK, TYPES.CHAR, stringOption);
stringOption.modify("");
testGetXXXOptionDo(excelUtils, sheet, DATA.NULL_STRING, TYPES.CHAR, stringOption);
stringOption.modify("1");
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_TRUE, TYPES.CHAR, stringOption);
stringOption.modify("0");
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_FALSE, TYPES.CHAR, stringOption);
stringOption.modify("40179");
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATE, TYPES.CHAR, stringOption);
stringOption.modify("2010-01-01 00:00:00");
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT1, TYPES.CHAR, stringOption);
stringOption.modify("2010-01-01 00:00:00");
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT2, TYPES.CHAR, stringOption);
stringOption.modify("2010-01-01 00:00:00");
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT1, TYPES.CHAR, stringOption);
stringOption.modify("2010-01-01 00:00:00");
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT2, TYPES.CHAR, stringOption);
stringOption.modify("2010-01-01");
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATE, TYPES.CHAR, stringOption);
stringOption.modify("40452.50090277778");
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATETIME, TYPES.CHAR, stringOption);
stringOption.modify("2010-10-01 12:01:18");
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT1, TYPES.CHAR, stringOption);
stringOption.modify("2010-10-01 12:01:18");
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT2, TYPES.CHAR, stringOption);
stringOption.modify("2010-10-01 12:01:18");
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT1, TYPES.CHAR, stringOption);
stringOption.modify("2010-10-01 12:01:18");
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT2, TYPES.CHAR, stringOption);
stringOption.modify("2010-10-01 12:01:18");
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATETIME, TYPES.CHAR, stringOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.ERROR, TYPES.CHAR, new CellTypeMismatchException("文字列"));
testGetXXXOptionDo(excelUtils, sheet, DATA.FORMULA, TYPES.CHAR, new CellTypeMismatchException("文字列"));
// getDateOptionのテスト
DateOption dateOption = new DateOption();
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_0, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_1, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MINUS1, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DECIMAL, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_OVER_MAX, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_UNDER_MIN, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DECIMAL, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_OVER_MAX, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_UNDER_MIN, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_BIG_VALUE, TYPES.DATE, new CellTypeMismatchException("日付"));
dateOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.BLANK, TYPES.DATE, dateOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NULL_STRING, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_TRUE, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_FALSE, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATE, TYPES.DATE, new CellTypeMismatchException("日付"));
dateOption.modify(DateUtil.getDayFromDate(2010, 1, 1));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT1, TYPES.DATE, dateOption);
dateOption.modify(DateUtil.getDayFromDate(2010, 1, 1));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT2, TYPES.DATE, dateOption);
dateOption.modify(DateUtil.getDayFromDate(2010, 1, 1));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT1, TYPES.DATE, dateOption);
dateOption.modify(DateUtil.getDayFromDate(2010, 1, 1));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT2, TYPES.DATE, dateOption);
dateOption.modify(DateUtil.getDayFromDate(2010, 1, 1));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATE, TYPES.DATE, dateOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATETIME, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT1, TYPES.DATE, new CellTypeMismatchException("時分秒が0でない値は日付型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT2, TYPES.DATE, new CellTypeMismatchException("時分秒が0でない値は日付型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT1, TYPES.DATE, new CellTypeMismatchException("時分秒が0でない値は日付型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT2, TYPES.DATE, new CellTypeMismatchException("時分秒が0でない値は日付型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATETIME, TYPES.DATE, new CellTypeMismatchException("時分秒が0でない値は日付型に変換できません"));
testGetXXXOptionDo(excelUtils, sheet, DATA.ERROR, TYPES.DATE, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.FORMULA, TYPES.DATE, new CellTypeMismatchException("日付"));
// getDateTimeOptionのテスト
DateTimeOption dateTimeOption = new DateTimeOption();
DateTime dateTime = new DateTime();
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_0, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_1, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MINUS1, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DECIMAL, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_OVER_MAX, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_UNDER_MIN, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DECIMAL, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_OVER_MAX, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_UNDER_MIN, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_BIG_VALUE, TYPES.DATETIME, new CellTypeMismatchException("日付"));
dateTimeOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.BLANK, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NULL_STRING, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_TRUE, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_FALSE, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATE, TYPES.DATETIME, new CellTypeMismatchException("日付"));
dateTime.setElapsedSeconds(DateUtil.getDayFromDate(2010, 1, 1) * 86400L);
dateTimeOption.modify(dateTime);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT1, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT2, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT1, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT2, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATE, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATETIME, TYPES.DATETIME, new CellTypeMismatchException("日付"));
dateTime.setElapsedSeconds(DateUtil.getDayFromDate(2010, 10, 1) * 86400L + DateUtil.getSecondFromTime(12, 1, 18));
dateTimeOption.modify(dateTime);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT1, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATE_FMT2, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT1, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.DATETIME_DATETIME_FIMT2, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATETIME, TYPES.DATETIME, dateTimeOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.ERROR, TYPES.DATETIME, new CellTypeMismatchException("日付"));
testGetXXXOptionDo(excelUtils, sheet, DATA.FORMULA, TYPES.DATETIME, new CellTypeMismatchException("日付"));
// getDecimalOptionのテスト
DecimalOption decimalOption = new DecimalOption();
decimalOption.modify(new BigDecimal("0"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_0, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("1"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_1, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("-1"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MINUS1, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("999999999999999"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MAX, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("-999999999999999"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MIN, TYPES.DECIMAL, decimalOption);
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DECIMAL, TYPES.DECIMAL, new NumberFormatException("小数部を持つ実数をDECIMALに変換できません。"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_OVER_MAX, TYPES.DECIMAL, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_UNDER_MIN, TYPES.DECIMAL, new NumberFormatException("表現可能な範囲外の数値"));
testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.DECIMAL, new NumberFormatException("表現可能な範囲外の数値"));
decimalOption.modify(new BigDecimal("0"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("1"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("-1"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("6.54321"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DECIMAL, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("9223372036854775808"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_OVER_MAX, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("-9223372036854775809"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_UNDER_MIN, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("12345678901234567890"));
testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_BIG_VALUE, TYPES.DECIMAL, decimalOption);
decimalOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.BLANK, TYPES.DECIMAL, decimalOption);
longOption.setNull();
testGetXXXOptionDo(excelUtils, sheet, DATA.NULL_STRING, TYPES.DECIMAL, new NumberFormatException("DECIMALに変換できない文字列"));
decimalOption.modify(new BigDecimal("1"));
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_TRUE, TYPES.DECIMAL, decimalOption);
decimalOption.modify(new BigDecimal("0"));
testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_FALSE, TYPES.DECIMAL, decimalOption);