AbstractShardingStrategy implements ShardingStrategy { @Override public boolean isShardByTable() { return shardByTable; }  @Override abstract Set<String> locateDbShards(ShardingContext ctx); @Override abstract Set<String> locateTableShards(TableShardingContext ctx); @Override void initialize(Map<String, String> settings); @Override boolean isShardByDb(); @Override boolean isShardByTable(); @Override boolean isShardingEnable(String logicTableName); @Override Set<String> getAllTableShards(); @Override String getTableName(String logicTableName, String shard); static final String SHARDED_TABLES; static final String SEPARATOR; }
@Test public void testIsShardByTable() { AbstractShardingStrategy test = new TestShardingStrategy(); assertFalse(test.isShardByTable()); test.setShardByTable(true); assertTrue(test.isShardByTable()); }