use of com.dangdang.ddframe.rdb.sharding.router.fixture.OrderDatabaseShardingAlgorithm in project sharding-jdbc by dangdangdotcom.
the class DatabaseTest method setRouteRuleContext.
@Before
public void setRouteRuleContext() {
Map<String, DataSource> dataSourceMap = new HashMap<>();
dataSourceMap.put("ds_0", null);
dataSourceMap.put("ds_1", null);
DataSourceRule dataSourceRule = new DataSourceRule(dataSourceMap);
shardingRule = ShardingRule.builder().dataSourceRule(dataSourceRule).databaseShardingStrategy(new DatabaseShardingStrategy(new OrderDatabaseShardingAlgorithm())).build();
}
Aggregations