TableInfo { @Deprecated public TableInfo setEntityName(String entityName) { this.entityName = entityName; return this; }  @Deprecated TableInfo setConvert(boolean convert); String getEntityPath(); @Deprecated TableInfo setEntityName(String entityName); TableInfo setEntityName(StrategyConfig strategyConfig, String entityName); @Deprecated TableInfo setFields(List<TableField> fields); TableInfo addFields(List<TableField> fields); TableInfo addFields(TableField... fields); @Deprecated TableInfo setImportPackages(String pkg); TableInfo addImportPackages(String... pkgs); boolean isLogicDelete(String logicDeletePropertyName); @Deprecated TableInfo setFieldNames(String fieldNames); String getFieldNames(); @Deprecated TableInfo setCommonFields(List<TableField> commonFields); TableInfo addCommonFields(TableField... commonFields); TableInfo addCommonFields(List<TableField> commonFields); void importPackage(StrategyConfig strategyConfig, GlobalConfig globalConfig); void processTable(StrategyConfig strategyConfig, GlobalConfig globalConfig); String getFileName(String entityName, String value, Supplier<String> defaultValue);  }
@Test void setEntityNameTest() { Assertions.assertTrue(new TableInfo().setName("user").setEntityName(new StrategyConfig(), "UserEntity").isConvert()); Assertions.assertFalse(new TableInfo().setName("user").setEntityName(new StrategyConfig(), "User").isConvert()); Assertions.assertFalse(new TableInfo().setName("USER").setEntityName(new StrategyConfig().setCapitalMode(true), "User").isConvert()); Assertions.assertTrue(new TableInfo().setName("USER").setEntityName(new StrategyConfig().setCapitalMode(true), "UserEntity").isConvert()); Assertions.assertTrue(new TableInfo().setName("test_user").setEntityName(new StrategyConfig().setNaming(NamingStrategy.no_change), "TestUser").isConvert()); Assertions.assertFalse(new TableInfo().setName("user").setEntityName(new StrategyConfig().setNaming(NamingStrategy.no_change), "User").isConvert()); Assertions.assertFalse(new TableInfo().setName("test_user").setEntityName(new StrategyConfig().setNaming(NamingStrategy.underline_to_camel), "TestUser").isConvert()); Assertions.assertTrue(new TableInfo().setName("TEST_USER").setEntityName(new StrategyConfig().setNaming(NamingStrategy.underline_to_camel), "TestUser").isConvert()); }