@Test
public void testCustomEnum() throws Exception {
Class.forName("com.mysql.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/test2", "root", "");
Test2Factory create = new Test2Factory(connection);
create.delete(T_BOOLEANS).execute();
assertEquals(1,
create.insertInto(T_BOOLEANS)
.set(T_BOOLEANS.ID, 1)
.set(T_BOOLEANS.ONE_ZERO, Boolean_10._0)
.set(T_BOOLEANS.TRUE_FALSE_LC, BooleanTrueFalseLc.true_)
.set(T_BOOLEANS.TRUE_FALSE_UC, BooleanTrueFalseUc.FALSE)
.set(T_BOOLEANS.Y_N_LC, BooleanYnLc.y)
.set(T_BOOLEANS.Y_N_UC, BooleanYnUc.N)
.set(T_BOOLEANS.YES_NO_LC, BooleanYesNoLc.yes)
.set(T_BOOLEANS.YES_NO_UC, BooleanYesNoUc.NO)
.execute());
TBooleansRecord bool = create.selectFrom(T_BOOLEANS).fetchOne();
assertEquals(1, (int) bool.getId());
assertEquals(Boolean_10._0, bool.getOneZero());
assertEquals(BooleanTrueFalseLc.true_, bool.getTrueFalseLc());
assertEquals(BooleanTrueFalseUc.FALSE, bool.getTrueFalseUc());
assertEquals(BooleanYnLc.y, bool.getYNLc());
assertEquals(BooleanYnUc.N, bool.getYNUc());
assertEquals(BooleanYesNoLc.yes, bool.getYesNoLc());
assertEquals(BooleanYesNoUc.NO, bool.getYesNoUc());
assertEquals(1,
create.delete(T_BOOLEANS).execute());
}