gxxiong commented on code in PR #21808:
URL: https://github.com/apache/shardingsphere/pull/21808#discussion_r1009208149


##########
features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptRuleTest.java:
##########
@@ -123,28 +123,47 @@ public void assertFindPlainColumn() {
         assertFalse(new 
EncryptRule(createEncryptRuleConfiguration()).findPlainColumn("t_encrypt", 
"notExistLogicColumn").isPresent());
     }
     
+    @Test
+    public void assertFindFuzzyQueryColumn() {
+        assertFalse(new 
EncryptRule(createEncryptRuleConfiguration()).findFuzzyQueryColumn("t_encrypt", 
"pwd_cipher").isPresent());
+    }
+    
+    @Test
+    public void assertGetEncryptFuzzyQueryValues() {
+        List<Object> encryptFuzzyQueryValues = new 
EncryptRule(createEncryptRuleConfiguration())
+                .getEncryptFuzzyQueryValues(DefaultDatabase.LOGIC_NAME, 
DefaultDatabase.LOGIC_NAME, "t_encrypt", "pwd", 
Collections.singletonList(null));
+        for (final Object value : encryptFuzzyQueryValues) {
+            assertNull(value);
+        }
+    }
+    
+    @Test
+    public void assertGetFuzzyQueryColumns() {
+        assertFalse(new 
EncryptRule(createEncryptRuleConfiguration()).getFuzzyQueryColumns("t_encrypt").isEmpty());
+    }
+    
     @Test
     public void assertIsQueryWithCipherColumn() {
-        EncryptColumnRuleConfiguration encryptColumnConfig = new 
EncryptColumnRuleConfiguration("encrypt_column", "encrypt_cipher", "", "", 
"test_encryptor", null);
+        EncryptColumnRuleConfiguration encryptColumnConfig = new 
EncryptColumnRuleConfiguration("encrypt_column", "encrypt_cipher", "", "", "", 
"test_encryptor", null);
         EncryptTableRuleConfiguration tableConfig = new 
EncryptTableRuleConfiguration("t_encrypt", 
Collections.singletonList(encryptColumnConfig), null);
         AlgorithmProvidedEncryptRuleConfiguration ruleConfig = new 
AlgorithmProvidedEncryptRuleConfiguration(
                 Collections.singleton(tableConfig), 
Collections.singletonMap("test_encryptor", new CoreEncryptAlgorithmFixture()), 
true);
         EncryptRule actual = new EncryptRule(ruleConfig);
         assertTrue(actual.isQueryWithCipherColumn("t_encrypt", 
"encrypt_column"));
         

Review Comment:
   Problem is fixed



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to