rule = null;
}
public void testSqlActionShardingRuleConstructionAbnormally() {
try {
rule = new IBatisSqlActionShardingRule(null, "shard1,shard2", DEFAULT_SHARDING_PATTERN);
fail();
} catch (IllegalArgumentException e) {
// pass
}
try {
rule = new IBatisSqlActionShardingRule("", "shard1,shard2", DEFAULT_SHARDING_PATTERN);
fail();
} catch (IllegalArgumentException e) {
// pass
}
try {
rule = new IBatisSqlActionShardingRule(DEFAULT_TYPE_PATTEN, "",
DEFAULT_SHARDING_PATTERN);
fail();
} catch (IllegalArgumentException e) {
// pass
}
try {
rule = new IBatisSqlActionShardingRule(DEFAULT_TYPE_PATTEN, null,
DEFAULT_SHARDING_PATTERN);
fail();
} catch (IllegalArgumentException e) {
// pass
}
try {
rule = new IBatisSqlActionShardingRule(DEFAULT_TYPE_PATTEN, "shard1,shard2", null);
fail();
} catch (IllegalArgumentException e) {
// pass
}
try {
rule = new IBatisSqlActionShardingRule(DEFAULT_TYPE_PATTEN, "shard1,shard2", "");
fail();
} catch (IllegalArgumentException e) {
// pass
}
}