use of com.dangdang.ddframe.rdb.sharding.api.strategy.fixture.TestSingleKeyShardingAlgorithm in project sharding-jdbc by dangdangdotcom.
the class ShardingStrategyTest method assertDoDynamicShardingForEqualSingleKey.
@Test
public void assertDoDynamicShardingForEqualSingleKey() {
ShardingStrategy strategy = new ShardingStrategy("column", new TestSingleKeyShardingAlgorithm());
assertThat(strategy.doDynamicSharding(createShardingValues(new ShardingValue<>("logicTable", "column", "1"))), is((Collection<String>) Collections.singletonList("1")));
}
Aggregations