@Test
void processTableTest() {

    TableInfo tableInfo = new TableInfo().setName("user");
    tableInfo.processTable(new StrategyConfig(), new GlobalConfig());
    Assertions.assertFalse(tableInfo.isConvert());
    Assertions.assertEquals("UserMapper", tableInfo.getMapperName());
    Assertions.assertEquals("UserXml", tableInfo.getXmlName());
    Assertions.assertEquals("IUserService", tableInfo.getServiceName());
    Assertions.assertEquals("UserServiceImpl", tableInfo.getServiceImplName());
    Assertions.assertEquals("UserController", tableInfo.getControllerName());
    tableInfo = new TableInfo().setName("user");
    tableInfo.processTable(new StrategyConfig(), new GlobalConfig().setEntityName("%sEntity")
        .setXmlName("%sXml").setMapperName("%sDao").setControllerName("%sAction").setServiceName("%sService").setServiceImplName("%sServiceImp"));
    Assertions.assertTrue(tableInfo.isConvert());
    Assertions.assertEquals("UserEntity", tableInfo.getEntityName());
    Assertions.assertEquals("UserDao", tableInfo.getMapperName());
    Assertions.assertEquals("UserXml", tableInfo.getXmlName());
    Assertions.assertEquals("UserService", tableInfo.getServiceName());
    Assertions.assertEquals("UserServiceImp", tableInfo.getServiceImplName());
    Assertions.assertEquals("UserAction", tableInfo.getControllerName());
    tableInfo = new TableInfo().setName("user");
    tableInfo.processTable(new StrategyConfig().setNameConvert(new INameConvert() {
        @Override
        public String entityNameConvert(TableInfo tableInfo) {
            return "E" + tableInfo.getName();
        }
        @Override
        public String propertyNameConvert(TableField field) {
            return field.getName();
        }
    }), new GlobalConfig());
    Assertions.assertTrue(tableInfo.isConvert());
    Assertions.assertEquals("Euser", tableInfo.getEntityName());
}