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 2020/08/20 15:11:26 UTC

[GitHub] [shardingsphere] terrymanu commented on a change in pull request #6954: using SPI to instantiate MasterSlaveRouteDecorator

terrymanu commented on a change in pull request #6954:
URL: https://github.com/apache/shardingsphere/pull/6954#discussion_r474057761



##########
File path: shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-route/src/test/java/org/apache/shardingsphere/masterslave/route/engine/MasterSlaveRouteDecoratorTest.java
##########
@@ -148,7 +158,17 @@ public void assertDecorateToMasterWithoutRouteUnitsAndWithParameters() {
         assertThat(routedDataSourceNames.next(), is(MASTER_DATASOURCE));
         assertThat(actual.getParameters().get(0), is("true"));
     }
-    
+
+    @Test
+    public void assertTypeClass() {

Review comment:
       It is the static code, so the test case is unnecessary.

##########
File path: shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-route/src/test/java/org/apache/shardingsphere/masterslave/route/engine/MasterSlaveRouteDecoratorTest.java
##########
@@ -148,7 +158,17 @@ public void assertDecorateToMasterWithoutRouteUnitsAndWithParameters() {
         assertThat(routedDataSourceNames.next(), is(MASTER_DATASOURCE));
         assertThat(actual.getParameters().get(0), is("true"));
     }
-    
+
+    @Test
+    public void assertTypeClass() {
+        assertThat(routeDecorator.getTypeClass(), org.hamcrest.core.Is.<Class<?>>is(MasterSlaveRule.class));
+    }
+
+    @Test
+    public void assertOrder() {

Review comment:
       It is the static code, so the test case is unnecessary. 




----------------------------------------------------------------
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