use of io.shardingjdbc.core.api.algorithm.fixture.TestRangeShardingAlgorithm in project sharding-jdbc by shardingjdbc.
the class ShardingStrategyTest method assertDoShardingForBetweenSingleKey.
@Test
public void assertDoShardingForBetweenSingleKey() {
StandardShardingStrategy strategy = new StandardShardingStrategy(new StandardShardingStrategyConfiguration("column", new TestPreciseShardingAlgorithm(), new TestRangeShardingAlgorithm()));
assertThat(strategy.doSharding(targets, Collections.<ShardingValue>singletonList(new RangeShardingValue<>("logicTable", "column", Range.open("1", "3")))), is((Collection<String>) Sets.newHashSet("1", "2", "3")));
}
Aggregations