You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "ZJJ087 (via GitHub)" <gi...@apache.org> on 2023/04/12 06:18:11 UTC

[GitHub] [shardingsphere] ZJJ087 commented on a diff in pull request #25075: Improve properties verification of ShadowAlgorithms #24749

ZJJ087 commented on code in PR #25075:
URL: https://github.com/apache/shardingsphere/pull/25075#discussion_r1163670182


##########
features/shadow/core/src/test/java/org/apache/shardingsphere/shadow/algorithm/shadow/column/ColumnValueMatchShadowAlgorithmTest.java:
##########
@@ -49,4 +50,17 @@ void assertExceptionCase() {
         assertThrows(UnsupportedShadowColumnTypeException.class,
                 () -> PreciseColumnShadowValueFixtureBuilder.createExceptionCase(SHADOW_TABLE, SHADOW_COLUMN).forEach(each -> assertFalse(shadowAlgorithm.isShadow(each))));
     }
+
+    @Test
+    void assertPropertiesWithoutColumn() {
+        assertThrows(ShadowAlgorithmInitializationException.class, () ->
+                TypedSPILoader.getService(ShadowAlgorithm.class, "VALUE_MATCH", PropertiesBuilder.build(new Property("operation", "insert"), new Property("value", "1"))));
+    }
+
+    @Test
+    void assertPropertiesWithWrongOperation() {
+        assertThrows(ShadowAlgorithmInitializationException.class, () ->
+                TypedSPILoader.getService(ShadowAlgorithm.class, "VALUE_MATCH",
+                                          PropertiesBuilder.build(new Property("column", SHADOW_COLUMN), new Property("operation", "inser"), new Property("value", "1"))));

Review Comment:
   done



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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org