use of io.shardingjdbc.core.api.algorithm.sharding.PreciseShardingValue in project sharding-jdbc by shardingjdbc.
the class ShardingStrategyTest method assertDoShardingForMultipleKeys.
@Test
public void assertDoShardingForMultipleKeys() {
ComplexShardingStrategy strategy = new ComplexShardingStrategy(new ComplexShardingStrategyConfiguration("column", new TestComplexKeysShardingAlgorithm()));
assertThat(strategy.doSharding(targets, Collections.<ShardingValue>singletonList(new PreciseShardingValue<>("logicTable", "column", "1"))), is((Collection<String>) Sets.newHashSet("1", "2", "3")));
}
Aggregations