You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/07/09 00:33:03 UTC

[GitHub] [incubator-shardingsphere] sunbufu commented on a change in pull request #2678: Fix#2629

sunbufu commented on a change in pull request #2678: Fix#2629
URL: https://github.com/apache/incubator-shardingsphere/pull/2678#discussion_r301354273
 
 

 ##########
 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(expected = IllegalArgumentException.class)
+    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(expected = IllegalArgumentException.class)
 
 Review comment:
   I'll do it later.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services