use of com.dangdang.ddframe.rdb.sharding.api.strategy.table.NoneTableShardingAlgorithm in project sharding-jdbc by dangdangdotcom.
the class TableRuleTest method assertTableRuleForDynamicWithTableStrategy.
@Test
public void assertTableRuleForDynamicWithTableStrategy() {
TableRule actual = TableRule.builder("logicTable").dynamic(true).dataSourceRule(createDataSourceRule()).tableShardingStrategy(new TableShardingStrategy("", new NoneTableShardingAlgorithm())).build();
assertDynamicTable(actual);
assertNull(actual.getDatabaseShardingStrategy());
assertNotNull(actual.getTableShardingStrategy());
}
use of com.dangdang.ddframe.rdb.sharding.api.strategy.table.NoneTableShardingAlgorithm in project sharding-jdbc by dangdangdotcom.
the class TableRuleTest method assertTableRuleForDynamicWithAllStrategies.
@Test
public void assertTableRuleForDynamicWithAllStrategies() {
TableRule actual = TableRule.builder("logicTable").dynamic(true).dataSourceRule(createDataSourceRule()).databaseShardingStrategy(new DatabaseShardingStrategy("", new NoneDatabaseShardingAlgorithm())).tableShardingStrategy(new TableShardingStrategy("", new NoneTableShardingAlgorithm())).build();
assertDynamicTable(actual);
assertNotNull(actual.getDatabaseShardingStrategy());
assertNotNull(actual.getTableShardingStrategy());
}
Aggregations