Search in sources :

Example 1 with TestComplexKeysShardingAlgorithm

use of io.shardingjdbc.orchestration.internal.json.fixture.TestComplexKeysShardingAlgorithm in project sharding-jdbc by shardingjdbc.

the class ShardingRuleConfigurationConverterTest method assertToJsonForComplexStrategy.

@Test
public void assertToJsonForComplexStrategy() {
    ComplexShardingStrategyConfiguration actual = new ComplexShardingStrategyConfiguration("order_id,item_id", new TestComplexKeysShardingAlgorithm());
    assertThat(ShardingRuleConfigurationConverter.toJson(getCommonShardingRuleConfig(actual)), is(getJsonForComplexStrategy()));
}
Also used : ComplexShardingStrategyConfiguration(io.shardingjdbc.core.api.config.strategy.ComplexShardingStrategyConfiguration) TestComplexKeysShardingAlgorithm(io.shardingjdbc.orchestration.internal.json.fixture.TestComplexKeysShardingAlgorithm) Test(org.junit.Test)

Aggregations

ComplexShardingStrategyConfiguration (io.shardingjdbc.core.api.config.strategy.ComplexShardingStrategyConfiguration)1 TestComplexKeysShardingAlgorithm (io.shardingjdbc.orchestration.internal.json.fixture.TestComplexKeysShardingAlgorithm)1 Test (org.junit.Test)1