kezhenxu94 commented on a change in pull request #2678: Fix#2629
URL:
https://github.com/apache/incubator-shardingsphere/pull/2678#discussion_r301135852
##########
File path:
sharding-core/sharding-core-common/src/test/java/org/apache/shardingsphere/core/rule/ShardingRuleTest.java
##########
@@ -328,6 +329,33 @@ public void assertGetShardingLogicTableNames() {
ShardingRule actual = createMaximumShardingRule();
assertThat(actual.getShardingLogicTableNames(Arrays.asList("LOGIC_TABLE",
"BROADCAST_TABLE")),
CoreMatchers.<Collection<String>>is(Collections.singletonList("LOGIC_TABLE")));
}
+
+ @Test
+ public void assertConstructShardingRuleWithNullShardingRuleConfiguration(){
+ try {
+ new ShardingRule(null, createDataSourceNames());
+ fail("should throw a IllegalArgumentException when execute
ShardingRule's constructor with null ShardingRuleConfiguration");
+ } catch (IllegalArgumentException ignored){
+ } catch (Exception ex){
+ fail("should throw a IllegalArgumentException when execute
ShardingRule's construction with null ShardingRuleConfiguration");
+ }
+ }
+
+ @Test
Review comment:
and here
```suggestion
@Test(expected = IllegalArgumentException.class)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services