Search in sources :

Example 1 with NoneShardingStrategy

use of io.shardingjdbc.core.routing.strategy.none.NoneShardingStrategy in project sharding-jdbc by shardingjdbc.

the class ShardingStrategyTest method assertDoShardingWithoutShardingColumns.

@Test
public void assertDoShardingWithoutShardingColumns() {
    NoneShardingStrategy strategy = new NoneShardingStrategy();
    assertThat(strategy.doSharding(targets, Collections.<ShardingValue>emptySet()), is(targets));
}
Also used : NoneShardingStrategy(io.shardingjdbc.core.routing.strategy.none.NoneShardingStrategy) PreciseShardingValue(io.shardingjdbc.core.api.algorithm.sharding.PreciseShardingValue) ShardingValue(io.shardingjdbc.core.api.algorithm.sharding.ShardingValue) RangeShardingValue(io.shardingjdbc.core.api.algorithm.sharding.RangeShardingValue) Test(org.junit.Test)

Aggregations

PreciseShardingValue (io.shardingjdbc.core.api.algorithm.sharding.PreciseShardingValue)1 RangeShardingValue (io.shardingjdbc.core.api.algorithm.sharding.RangeShardingValue)1 ShardingValue (io.shardingjdbc.core.api.algorithm.sharding.ShardingValue)1 NoneShardingStrategy (io.shardingjdbc.core.routing.strategy.none.NoneShardingStrategy)1 Test (org.junit.Test)1