use of com.dangdang.ddframe.rdb.sharding.api.strategy.fixture.TestMultipleKeysShardingAlgorithm in project sharding-jdbc by dangdangdotcom.
the class ShardingStrategyTest method assertDoStaticShardingForMultipleKeys.
@Test
public void assertDoStaticShardingForMultipleKeys() {
ShardingStrategy strategy = new ShardingStrategy("column", new TestMultipleKeysShardingAlgorithm());
assertThat(strategy.doStaticSharding(SQLStatementType.SELECT, targets, createShardingValues(new ShardingValue<>("logicTable", "column", "1"))), is((Collection<String>) Arrays.asList("1", "2", "3")));
}
use of com.dangdang.ddframe.rdb.sharding.api.strategy.fixture.TestMultipleKeysShardingAlgorithm in project sharding-jdbc by dangdangdotcom.
the class ShardingStrategyTest method assertDoDynamicShardingForMultipleKeys.
@Test
public void assertDoDynamicShardingForMultipleKeys() {
ShardingStrategy strategy = new ShardingStrategy("column", new TestMultipleKeysShardingAlgorithm());
assertThat(strategy.doDynamicSharding(createShardingValues(new ShardingValue<>("logicTable", "column", "1"))), is((Collection<String>) Collections.<String>emptyList()));
}
Aggregations